🚀 OAuth features
OAuth features are SDK composers, not Express middleware; authService mounts each provider's initiation and callback feature.
All three callback features require a nonempty configuration.oauth.allowedRedirectOrigins allowlist. Their routes validate the state's redirect URL after provider callback/state processing and before identity checks, token generation, storage, or redirect: malformed/disallowed URLs return 400, and undefined/empty origins return 500. This is handler validation; the callback features still compose no schema or route validators. See callback routes for the full pipelines.
All three initiation features also validate the request's redirectUrl before provider state preparation or driver invocation. Malformed/disallowed URLs map to 400; missing/empty origins return AuthenticationUnexpectedError mapped to 500 by the initiation route. Initiation schemas still validate parameter shape separately from this handler check.
Inventory
| Feature | Composed schema(s) | Composed route(s) | Purpose |
|---|---|---|---|
googleOAuthFeature | googleOauthSchema | googleOAuthRoute | Start Google OAuth. |
googleOAuthCallbackFeature | none | googleOAuthCallbackRoute | Handle Google callback. |
lineOAuthFeature | lineOauthSchema | lineOAuthRoute | Start LINE OAuth. |
lineOAuthCallbackFeature | none | lineOAuthCallbackRoute | Handle LINE callback. |
twitterOAuthFeature | twitterOauthSchema | twitterOAuthRoute | Start Twitter OAuth. |
twitterOAuthCallbackFeature | none | twitterOAuthCallbackRoute | Handle Twitter callback. |
Details
Each feature is mounted by authService. The source definitions below show the exact schema-to-route composition.
googleOAuthFeature
Implementation
This feature composes the schema and route linked in its inventory row; it is mounted by authService or a compatible custom service context.View complete source
googleOAuthCallbackFeature
Implementation
This feature composes the schema and route linked in its inventory row; it is mounted by authService or a compatible custom service context.
Composes only the callback route; no callback schema is composed.View complete source
lineOAuthFeature
Implementation
This feature composes the schema and route linked in its inventory row; it is mounted by authService or a compatible custom service context.View complete source
lineOAuthCallbackFeature
Implementation
This feature composes the schema and route linked in its inventory row; it is mounted by authService or a compatible custom service context.
Composes only the callback route; no callback schema is composed.View complete source
twitterOAuthFeature
Implementation
This feature composes the schema and route linked in its inventory row; it is mounted by authService or a compatible custom service context.View complete source
twitterOAuthCallbackFeature
Implementation
This feature composes the schema and route linked in its inventory row; it is mounted by authService or a compatible custom service context.
Composes only the callback route; no callback schema is composed.View complete source