mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-20 20:26:55 -05:00
feat(oidc-provider): support prompt=create
This commit is contained in:
@@ -349,6 +349,10 @@ export const auth = betterAuth({
|
||||
|
||||
You don't need to handle anything from your side; when a new session is created, the plugin will handle continuing the authorization flow.
|
||||
|
||||
### Initiating Registration (`prompt=create`)
|
||||
|
||||
Better Auth supports the OpenID Connect Prompt Create extension. When an authorization request includes `prompt=create` and the user is not authenticated, Better Auth will redirect the user to `createAccountPage` (if provided) instead of `loginPage`. If `createAccountPage` is not set, the user will be redirected to `loginPage` and you can render a sign-up experience based on the `prompt` query parameter.
|
||||
|
||||
## Configuration
|
||||
|
||||
### OIDC Metadata
|
||||
@@ -620,6 +624,8 @@ Table Name: `oauthConsent`
|
||||
|
||||
**loginPage**: `string` - Path to the custom login page.
|
||||
|
||||
**createAccountPage**: `string` - Path to the custom create account (sign-up) page. When an authorization request includes `prompt=create`, unauthenticated users will be redirected here instead of `loginPage`.
|
||||
|
||||
**consentPage**: `string` - Path to the custom consent page.
|
||||
|
||||
**trustedClients**: `(Client & { skipConsent?: boolean })[]` - Array of trusted clients that are configured directly in the provider options. These clients bypass database lookups and can optionally skip consent screens.
|
||||
|
||||
Reference in New Issue
Block a user