https://identities.authsafe.inhttps://identities.authsafe.in/auth/authorize| Parameter | Type | Required | Description |
|---|---|---|---|
client_id | string | Yes | Your application's client identifier |
redirect_uri | string | Yes | URI to redirect after authorization |
response_type | string | Yes | Must be code for authorization code flow |
scope | string | No | Space-separated list of requested scopes (e.g., openid profile email) |
state | string | Recommended | Opaque value to maintain state between request and callback |
code_challenge | string | Yes | PKCE code challenge (required for security) |
code_challenge_method | string | Yes | Must be S256 (SHA-256) |
curl "https://identities.authsafe.in/auth/authorize?client_id=your_client_id&redirect_uri=https://yourapp.com/callback&response_type=code&scope=openid%20profile%20email&state=random_state_string&code_challenge=CODE_CHALLENGE&code_challenge_method=S256"redirect_uri with an authorization code:
https://yourapp.com/callback?code=AUTHORIZATION_CODE&state=random_state_string/auth/tokenContent-Type: application/x-www-form-urlencoded| Parameter | Type | Required | Description |
|---|---|---|---|
grant_type | string | Yes | Must be authorization_code |
code | string | Yes | The authorization code received from /auth/authorize |
redirect_uri | string | Yes | Must match the redirect URI used in the authorize request |
client_id | string | Yes | Your application's client identifier |
client_secret | string | Yes | Your application's client secret |
code_verifier | string | Yes | PKCE code verifier |
curl -X POST https://identities.authsafe.in/auth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=authorization_code" \
-d "code=AUTHORIZATION_CODE" \
-d "redirect_uri=https://yourapp.com/callback" \
-d "client_id=your_client_id" \
-d "client_secret=your_client_secret" \
-d "code_verifier=CODE_VERIFIER"{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"refresh_token": "refresh_token_value",
"id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"scope": "openid profile email"
}| Parameter | Type | Required | Description |
|---|---|---|---|
grant_type | string | Yes | Must be refresh_token |
refresh_token | string | Yes | The refresh token received from a previous token request |
client_id | string | Yes | Your application's client identifier |
client_secret | string | Yes | Your application's client secret |
scope | string | No | Requested scopes (cannot exceed original grant) |
curl -X POST https://identities.authsafe.in/auth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=refresh_token" \
-d "refresh_token=REFRESH_TOKEN" \
-d "client_id=your_client_id" \
-d "client_secret=your_client_secret"{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "openid profile email"
}| Parameter | Type | Required | Description |
|---|---|---|---|
grant_type | string | Yes | Must be client_credentials |
client_id | string | Yes | Your application's client identifier |
client_secret | string | Yes | Your application's client secret |
scope | string | No | Requested scopes |
curl -X POST https://identities.authsafe.in/auth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=your_client_id" \
-d "client_secret=your_client_secret" \
-d "scope=api:read"{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "api:read"
}/auth/user-infoAuthorization: Bearer ACCESS_TOKENcurl https://identities.authsafe.in/auth/user-info \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."{
"sub": "user_unique_identifier",
"name": "John Doe",
"email": "john.doe@example.com",
"email_verified": true,
"picture": "https://example.com/profile.jpg",
"updated_at": 1234567890
}/auth/introspectContent-Type: application/x-www-form-urlencoded| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Yes | The token to introspect |
client_id | string | Yes | Your application's client identifier |
client_secret | string | Yes | Your application's client secret |
curl -X POST https://identities.authsafe.in/auth/introspect \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "token=TOKEN_TO_INTROSPECT" \
-d "client_id=your_client_id" \
-d "client_secret=your_client_secret"{
"active": true,
"scope": "openid profile email",
"client_id": "your_client_id",
"token_type": "Bearer",
"exp": 1234567890,
"iat": 1234564290,
"sub": "user_unique_identifier"
}{
"active": false
}/auth/revokeContent-Type: application/x-www-form-urlencoded| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Yes | The token to revoke |
client_id | string | Yes | Your application's client identifier |
client_secret | string | Yes | Your application's client secret |
curl -X POST https://identities.authsafe.in/auth/revoke \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "token=TOKEN_TO_REVOKE" \
-d "client_id=your_client_id" \
-d "client_secret=your_client_secret"{
"message": "Token revoked successfully"
}/auth/logout| Parameter | Type | Required | Description |
|---|---|---|---|
id_token_hint | string | Recommended | ID token previously issued to the client |
post_logout_redirect_uri | string | No | URI to redirect after logout (must be pre-registered) |
state | string | No | Opaque value to maintain state |
curl "https://identities.authsafe.in/auth/logout?id_token_hint=ID_TOKEN&post_logout_redirect_uri=https://yourapp.com/logged-out&state=random_state"post_logout_redirect_uri if provided, otherwise to the default logout page.
/auth/branding| Parameter | Type | Required | Description |
|---|---|---|---|
client_id | string | Yes | The client identifier |
curl "https://identities.authsafe.in/auth/branding?client_id=your_client_id"{
"logo_url": "https://example.com/logo.png",
"brand_color": "#0066CC",
"application_name": "Your Application",
"privacy_policy_url": "https://example.com/privacy",
"terms_of_service_url": "https://example.com/terms"
}/.well-known/openid-configurationcurl https://identities.authsafe.in/.well-known/openid-configuration{
"issuer": "https://identities.authsafe.in",
"authorization_endpoint": "https://identities.authsafe.in/auth/authorize",
"token_endpoint": "https://identities.authsafe.in/auth/token",
"userinfo_endpoint": "https://identities.authsafe.in/auth/user-info",
"jwks_uri": "https://identities.authsafe.in/.well-known/jwks.json",
"end_session_endpoint": "https://identities.authsafe.in/auth/logout",
"introspection_endpoint": "https://identities.authsafe.in/auth/introspect",
"revocation_endpoint": "https://identities.authsafe.in/auth/revoke",
"response_types_supported": ["code"],
"grant_types_supported": ["authorization_code", "refresh_token", "client_credentials"],
"subject_types_supported": ["public"],
"id_token_signing_alg_values_supported": ["RS256"],
"scopes_supported": ["openid", "profile", "email", "offline_access"],
"token_endpoint_auth_methods_supported": ["client_secret_post"],
"code_challenge_methods_supported": ["S256"],
"claims_supported": ["sub", "name", "email", "email_verified", "picture", "updated_at"]
}/.well-known/jwks.jsoncurl https://identities.authsafe.in/.well-known/jwks.json{
"keys": [
{
"kty": "RSA",
"use": "sig",
"kid": "key_identifier",
"alg": "RS256",
"n": "modulus_value",
"e": "AQAB"
}
]
}{
"error": "invalid_request",
"error_description": "Missing required parameter: code_verifier"
}| Error Code | Description |
|---|---|
invalid_request | The request is missing a required parameter or is otherwise malformed |
invalid_client | Client authentication failed |
invalid_grant | The authorization code or refresh token is invalid, expired, or revoked |
unauthorized_client | The client is not authorized to use this grant type |
unsupported_grant_type | The grant type is not supported |
invalid_scope | The requested scope is invalid or exceeds the granted scope |
access_denied | The user or authorization server denied the request |
JWT-based tokens signed with RS256. Verify signatures using the public keys from /.well-known/jwks.json
Opaque tokens stored securely server-side
Store tokens securely. Never expose tokens in URLs or logs
Access tokens expire after 1 hour by default. Use refresh tokens to obtain new access tokens
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1234567890429 Too Many Requests response.
Get started with AuthSafe in minutes with our step-by-step integration guide.
Learn about scopes, permissions, and implementing fine-grained access control.