Sign in with Vijitek
Add a Sign in with Vijitek button to your app. Users sign in with their Vijitek Account, approve access on a Vijitek consent screen, and your app receives standard OpenID Connect tokens. Any OIDC-compliant library works.
1. Register your app
- Open your project in the console → Auth → Sign in with Vijitek.
- Click New app and choose a type:
| Type | Use for | Credentials |
|---|---|---|
| Web app with a server | Next.js, ASP.NET, Rails, Laravel, Express… | Client ID + client secret |
| SPA or mobile app | Browser-only apps, iOS/Android, desktop | Client ID only; PKCE is required |
- Add your redirect URIs (exact match). They must be
https://,http://localhost, or, for mobile apps, a reverse-domain scheme such ascom.acme.app:/oauth. - Optionally add a homepage, logo, privacy policy and terms URL. They appear on the consent screen and help users trust your app.
The client secret is shown once. Store it on your server. You can rotate it any time; the old secret stops working immediately.
Apps belong to a project environment, so register separate apps for Development and Production.
2. Endpoints
Everything is discoverable from the issuer. The console shows your exact values under Auth → Sign in with Vijitek.
| Item | Path |
|---|---|
| Discovery | {issuer}/.well-known/openid-configuration |
| Authorize | {issuer}/connect/authorize |
| Token | {issuer}/connect/token |
| UserInfo | {issuer}/connect/userinfo |
| Revoke | {issuer}/connect/revoke |
| End session | {issuer}/connect/logout |
| JWKS | {issuer}/.well-known/jwks |
Production issuer: https://console.vijitek.com/api/
3. Scopes and claims
| Scope | Consent screen | Claims |
|---|---|---|
openid | Associate you with your personal info on Vijitek | sub |
profile | See your name and profile picture | name, preferred_username, picture |
email | See your email address | email, email_verified |
offline_access | Keep you signed in | issues a refresh token |
Use sub as the stable user ID. Emails can change.
4. Examples
Server app: Auth.js (Next.js)
// auth.ts
export const { handlers, auth, signIn } = NextAuth({
providers: [{
id: 'vijitek',
name: 'Vijitek',
type: 'oidc',
issuer: 'https://console.vijitek.com/api/',
clientId: process.env.VIJITEK_CLIENT_ID,
clientSecret: process.env.VIJITEK_CLIENT_SECRET,
authorization: { params: { scope: 'openid profile email' } },
}],
})
Redirect URI: https://your-app.com/api/auth/callback/vijitek
Server app: ASP.NET Core
builder.Services.AddAuthentication(o =>
{
o.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;
o.DefaultChallengeScheme = "Vijitek";
})
.AddCookie()
.AddOpenIdConnect("Vijitek", o =>
{
o.Authority = "https://console.vijitek.com/api";
o.ClientId = builder.Configuration["Vijitek:ClientId"];
o.ClientSecret = builder.Configuration["Vijitek:ClientSecret"];
o.ResponseType = "code";
o.UsePkce = true;
o.SaveTokens = true;
o.GetClaimsFromUserInfoEndpoint = true;
o.Scope.Add("email");
o.CallbackPath = "/signin-vijitek";
});
SPA: @vijihub/auth
import { createAuthClient } from '@vijihub/auth'
const vijitek = createAuthClient({
authority: 'https://console.vijitek.com/api',
clientId: 'vtk_…',
redirectUri: 'https://your-app.com/auth/callback',
scopes: ['openid', 'profile', 'email', 'offline_access'],
})
await vijitek.login() // "Sign in with Vijitek" button
await vijitek.handleRedirectCallback() // on /auth/callback
const user = await vijitek.getUser() // { sub, name, email, email_verified, picture }
5. Prompts and hints
| Parameter | Effect |
|---|---|
prompt=consent | Always show the consent screen |
prompt=login | Ask for credentials again |
prompt=none | Never show UI; returns login_required / consent_required if needed |
login_hint=user@example.com | Pre-fills the email field |
After a user approves your app once, later sign-ins skip the consent screen unless you ask for new scopes.
6. Security model
- Tokens issued to your app carry your client ID as audience (
aud). They are rejected by Vijitek platform APIs, so a leaked app token can't manage the user's Vijitek resources. - Your app never receives platform roles or permissions. It only gets the identity claims listed above.
- Users can see and remove your app's access under Account → Connected apps. Removing access revokes its refresh tokens immediately. You can also revoke a user from the console (Users on the app).
- Deleting an app revokes every grant and token issued to it.
- Customer apps call
/connect/token,/connect/userinfoand discovery from any origin (CORS enabled, no cookies).