You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -306,7 +314,41 @@ After a session is obtained through the auth flow, each request:
306
314
307
315
## AuthFlow & AuthStep
308
316
309
-
An `AuthFlow` is a named collection of `AuthStep` objects representing the complete multi-step authentication process used to obtain a session. See [src/authentication/auth-flow.ts](../src/authentication/auth-flow.ts) and [src/authentication/auth-step.ts](../src/authentication/auth-step.ts) for type definitions.
317
+
An `AuthFlow` is a named collection of `AuthStep` classes representing the complete multi-step authentication process used to obtain a session.
318
+
319
+
**AuthStep** is an abstract class that extends `BaseApiEndpoint`, allowing each step to leverage endpoint features:
320
+
- Request validation (body, query, params, headers via valsan)
321
+
- Middleware support
322
+
- Standardized error handling
323
+
- OpenAPI integration
324
+
325
+
See [src/authentication/auth-step.ts](../src/authentication/auth-step.ts) and [src/authentication/auth-flow.ts](../src/authentication/auth-flow.ts) for type definitions.
326
+
327
+
**Typical step responsibilities:**
328
+
-`challenge` - Generate a random challenge or nonce (e.g., PKCE code challenge)
329
+
-`authorization` - Handle user interaction (redirect to OAuth provider, login form, etc.)
330
+
-`tokenExchange` - Exchange credentials for tokens and create a session
0 commit comments