OIDC Endpoints
Complete reference for Passji's OpenID Connect endpoints, parameters, and response formats.
Base URL
All endpoints are served from:
https://passji.comDiscoveryGET
/.well-known/openid-configurationReturns the OpenID Connect discovery document. Use this to dynamically configure your OIDC client.
{
"issuer": "https://passji.com",
"authorization_endpoint": "https://passji.com/authorize",
"token_endpoint": "https://passji.com/token",
"userinfo_endpoint": "https://passji.com/userinfo",
"jwks_uri": "https://passji.com/jwks",
"registration_endpoint": "https://passji.com/clients/register",
"scopes_supported": ["openid", "emoji", "profile", "trust"],
"response_types_supported": ["code"],
"grant_types_supported": [
"authorization_code",
"refresh_token",
"client_credentials"
],
"subject_types_supported": ["public"],
"id_token_signing_alg_values_supported": ["RS256"],
"code_challenge_methods_supported": ["S256"]
}JSON Web Key SetGET
/.well-known/jwks.jsonReturns the public keys used to sign ID tokens. Use these to verify token signatures.
{
"keys": [
{
"kty": "RSA",
"use": "sig",
"kid": "passji-key-1",
"alg": "RS256",
"n": "0vx7agoebGcQSuu...",
"e": "AQAB"
}
]
}AuthorizationGET
/authorizeInitiates the authorization flow. Redirect users here to start authentication.
GET https://passji.com/authorize?
client_id=your_client_id
&redirect_uri=https://yourapp.com/callback
&response_type=code
&scope=openid emoji trust
&state=random_state_value
&code_challenge=abc123... // PKCE
&code_challenge_method=S256Parameters
| Parameter | Required | Description |
|---|---|---|
client_id | Yes | Your application's client ID |
redirect_uri | Yes | URL to redirect after auth (must be registered) |
response_type | Yes | Must be "code" |
scope | Yes | Space-separated scopes (must include "openid") |
state | Recommended | Random string for CSRF protection |
nonce | Optional | Included in ID token for replay protection |
code_challenge | Optional* | PKCE challenge (recommended for SPAs) |
code_challenge_method | Optional* | Must be "S256" if using PKCE |
TokenPOST
/tokenExchange authorization codes for tokens, or refresh existing tokens.
Authorization Code Grant
POST https://passji.com/token
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code
&code=authorization_code_from_callback
&redirect_uri=https://yourapp.com/callback
&client_id=your_client_id
&client_secret=your_client_secret
&code_verifier=pkce_verifier // If using PKCE{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "refresh_abc123def456...",
"id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"scope": "openid emoji trust"
}Refresh Token Grant
POST https://passji.com/token
Content-Type: application/x-www-form-urlencoded
grant_type=refresh_token
&refresh_token=refresh_abc123def456...
&client_id=your_client_id
&client_secret=your_client_secretToken Rotation: Refresh tokens are rotated on use. Each refresh returns a new refresh token with a 30-day TTL. The old token is invalidated.
UserInfoGET
/userinfoReturns claims about the authenticated user. Requires a valid access token.
GET https://passji.com/userinfo
Authorization: Bearer <access_token>{
"sub": "usr_abc123",
"emoji_id": "🦊🌸🎯",
"emoji_length": 3,
"trust_score": 0.85,
"account_age_days": 45
}ID Token Claims
The ID token is a signed JWT containing identity claims. Always verify the signature before trusting the claims.
// Standard OIDC claims
{
"iss": "https://passji.com", // Issuer
"sub": "usr_abc123", // Subject (unique user ID)
"aud": "your_client_id", // Audience
"exp": 1709859600, // Expiration time
"iat": 1709856000, // Issued at
"auth_time": 1709855990, // When user authenticated
"nonce": "your_nonce", // If provided in authorize
// Passji-specific claims
"emoji_id": "🦊🌸🎯", // Emoji sequence
"emoji_length": 3, // Number of emoji
"trust_score": 0.85, // 0.0 to 1.0
"account_age_days": 45, // Days since registration
"auth_method": "webauthn" // Always "webauthn" for humans
}Scopes Reference
| Scope | Claims | Description |
|---|---|---|
openid | sub | Required. Returns unique user identifier. |
emoji | emoji_id, emoji_length | The user's emoji identity. |
profile | emoji_id, emoji_length | Alias for emoji (OIDC standard name). |
trust | trust_score, account_age_days | Trust score and account metadata. |
Error Responses
Errors follow the OAuth 2.0 error response format:
{
"error": "invalid_request",
"error_description": "Missing required parameter: redirect_uri"
}Common Error Codes
| Error | Description |
|---|---|
invalid_request | Missing or invalid parameter |
invalid_client | Unknown client_id or invalid credentials |
invalid_grant | Invalid or expired authorization code |
access_denied | User denied consent |
invalid_token | Access token is invalid or expired |