Skip to main content

@idpass/data-collect-core / AuthResult

Interface: AuthResult

Defined in: interfaces/types.ts:1013

Authentication result returned after successful OIDC authentication.

Contains the tokens and metadata received from the OIDC provider after a successful authentication flow.

Example​

const authResult: AuthResult = {
access_token: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
id_token: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
refresh_token: "def50200a1b2c3d4e5f6...",
expires_in: 3600,
profile: {
sub: "user-123",
name: "John Doe",
email: "john.doe@example.com"
}
};

Properties​

access_token​

access_token: string

Defined in: interfaces/types.ts:1015

JWT access token for API authentication


id_token?​

optional id_token?: string

Defined in: interfaces/types.ts:1017

Optional JWT ID token containing user identity claims


refresh_token?​

optional refresh_token?: string

Defined in: interfaces/types.ts:1019

Optional refresh token for obtaining new access tokens


expires_in​

expires_in: number

Defined in: interfaces/types.ts:1021

Token lifetime in seconds from issuance


profile?​

optional profile?: Record<string, string>

Defined in: interfaces/types.ts:1023

Optional user profile information extracted from tokens


user_metadata?​

optional user_metadata?: Record<string, string>

Defined in: interfaces/types.ts:1024