AccessTokenResponse
Access and refresh token response.
| Name | Type | Definition |
|---|---|---|
access_token | string | Access token used to authorize Auth-protected requests. |
token_type | string | Token type, usually bearer. |
expires_in | number | Access token lifetime in seconds. |
expires_at | number | Unix timestamp when the access token expires. |
refresh_token | string | Refresh token used to mint a new access token. |
user? | PublicUser | User record associated with the session. |
provider_token? | string | Provider access token returned by external OAuth flows. |
provider_refresh_token? | string | Provider refresh token returned by external OAuth flows. |
id_token? | string | ID token returned by identity provider flows. |
Example
{ "access_token": "access-token", "token_type": "bearer", "expires_in": 3600, "expires_at": 1767229200, "refresh_token": "refresh-token", "user": { "id": "user-id", "project_id": "project-id", "email": "user@example.com", "phone": "+15551234567", "email_verified": true, "phone_verified": true, "is_anonymous": false, "created_at": "2026-01-01T00:00:00.000Z", "updated_at": "2026-01-01T00:00:00.000Z", "last_sign_in_at": "2026-01-01T00:00:00.000Z", "providers": [ "github" ], "identities": [ { "id": "identity-id", "provider_id": "provider-user-id", "user_id": "user-id", "provider": "github", "email": "user@example.com", "last_sign_in_at": "2026-01-01T00:00:00.000Z", "created_at": "2026-01-01T00:00:00.000Z", "updated_at": "2026-01-01T00:00:00.000Z", "identity_data": {} } ], "factors": [ { "id": "factor-id", "factor_type": "totp", "status": "verified", "display_name": "Authenticator app", "phone": "+15551234567", "created_at": "2026-01-01T00:00:00.000Z", "updated_at": "2026-01-01T00:00:00.000Z", "last_challenged_at": "2026-01-01T00:00:00.000Z" } ], "user_attributes": {}, "system_attributes": {} }, "provider_token": "provider-access-token", "provider_refresh_token": "provider-refresh-token", "id_token": "provider-id-token"}