Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add experimental flag in options #9178

Merged
merged 3 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,4 +410,13 @@ export interface AuthConfig {
* See also: [Guide: Securing a Preview Deployment](https://authjs.dev/getting-started/deployment#securing-a-preview-deployment)
*/
redirectProxyUrl?: string

/**
*
* Use this option to enable experimental features.
* When enabled, it will print a warning message to the console.
* @note Experimental features are not guaranteed to be stable and may change or be removed without notice. Please use with caution.
* @default {}
*/
experimental?: Record<string, boolean>
}
3 changes: 3 additions & 0 deletions packages/core/src/lib/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ export async function init({
logger,
callbackUrl: url.origin,
isOnRedirectProxy,
experimental: {
...authOptions.experimental,
}
}

// Init cookies
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,4 +586,5 @@ export interface InternalOptions<TProviderType = ProviderType> {
* See also {@link OAuthConfigInternal.redirectProxyUrl}.
*/
isOnRedirectProxy: boolean
experimental: Record<string, boolean>
}
Loading