@radzor/auth-oauth
OAuth 2.0 authentication flow supporting multiple providers (Google, GitHub, Discord). Handles token exchange, session management, and user profile retrieval.
Install
View source on GitHub →Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| providers* | Array<'google' | 'github' | 'discord'> | — | List of OAuth providers to enable. |
| redirectUrl* | string | — | URL to redirect to after successful authentication. |
| scopes | string[] | openid,profile,email | OAuth scopes to request from the provider. |
| sessionDuration | number | 86400 | Session duration in seconds (default: 24 hours). |
| clientCredentials* | Record<string, { clientId: string; clientSecret: string }> | — | OAuth client credentials for each enabled provider. Keys must match the provider names. |
| jwtSecret* | string | — |