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

  1. Open your project in the console → Auth → Sign in with Vijitek.
  2. Click New app and choose a type:
TypeUse forCredentials
Web app with a serverNext.js, ASP.NET, Rails, Laravel, Express…Client ID + client secret
SPA or mobile appBrowser-only apps, iOS/Android, desktopClient ID only; PKCE is required
  1. Add your redirect URIs (exact match). They must be https://, http://localhost, or, for mobile apps, a reverse-domain scheme such as com.acme.app:/oauth.
  2. 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.

ItemPath
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

ScopeConsent screenClaims
openidAssociate you with your personal info on Vijiteksub
profileSee your name and profile picturename, preferred_username, picture
emailSee your email addressemail, email_verified
offline_accessKeep you signed inissues 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

ParameterEffect
prompt=consentAlways show the consent screen
prompt=loginAsk for credentials again
prompt=noneNever show UI; returns login_required / consent_required if needed
login_hint=user@example.comPre-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/userinfo and discovery from any origin (CORS enabled, no cookies).