> {
return {
id: "netlify",
diff --git a/packages/core/src/providers/notion.ts b/packages/core/src/providers/notion.ts
index 4d97b65f..e6ba7b47 100644
--- a/packages/core/src/providers/notion.ts
+++ b/packages/core/src/providers/notion.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/notion
*/
@@ -60,7 +59,7 @@ const NOTION_API_VERSION = "2022-06-28"
/**
* Add Notion login to your page.
*
- * ## Example
+ * @example
*
* ```ts
* import { Auth } from "@auth/core"
@@ -74,15 +73,15 @@ const NOTION_API_VERSION = "2022-06-28"
*
* ---
*
- * ## Resources
+ * ### Resources
* - [Notion Docs](https://developers.notion.com/docs)
* - [Notion Authorization Docs](https://developers.notion.com/docs/authorization)
* - [Notion Integrations](https://www.notion.so/my-integrations)
*
* ---
*
- * ## Notes
- * You need to select "Public Integration" on the configuration page to get an `oauth_id` and `oauth_secret`. Private integrations do not provide these details.
+ * ### Notes
+ * You need to select "Public Integration" on the configuration page to get an `oauth_id` and `oauth_secret`. Private integrations do not provide these details.
* You must provide a `clientId` and `clientSecret` to use this provider, as-well as a redirect URI (due to this being required by Notion endpoint to fetch tokens).
*
* :::tip
diff --git a/packages/core/src/providers/oauth.ts b/packages/core/src/providers/oauth.ts
index 8069abef..0f13eae6 100644
--- a/packages/core/src/providers/oauth.ts
+++ b/packages/core/src/providers/oauth.ts
@@ -52,7 +52,10 @@ interface AdvancedEndpointHandler {
conform?: (response: Response) => Awaitable
}
-/** Either an URL (containing all the parameters) or an object with more granular control. */
+/**
+ * Either an URL (containing all the parameters) or an object with more granular control.
+ * @internal
+ */
export type EndpointHandler<
P extends UrlParams,
C = any,
@@ -92,6 +95,8 @@ export type ProfileCallback = (
tokens: TokenSet
) => Awaitable
+export type AccountCallback = (account: TokenSet) => TokenSet
+
export interface OAuthProviderButtonStyles {
logo: string
logoDark: string
@@ -138,13 +143,25 @@ export interface OAuth2Config
userinfo?: string | UserinfoEndpointHandler
type: "oauth"
/**
- * Receives the profile object returned by the OAuth provider, and returns the user object.
- * This will be used to create the user in the database.
+ * Receives the full {@link Profile} returned by the OAuth provider, and returns a subset.
+ * It is used to create the user in the database.
+ *
* Defaults to: `id`, `email`, `name`, `image`
*
- * [Documentation](https://authjs.dev/reference/adapters/models#user)
+ * @see [Database Adapter: User model](https://authjs.dev/reference/adapters#user)
*/
profile?: ProfileCallback
+ /**
+ * Receives the full {@link TokenSet} returned by the OAuth provider, and returns a subset.
+ * It is used to create the account associated with a user in the database.
+ *
+ * Defaults to: `access_token` and `id_token`
+ *
+ * @see [Database Adapter: Account model](https://authjs.dev/reference/adapters#account)
+ * @see https://openid.net/specs/openid-connect-core-1_0.html#TokenResponse
+ * @see https://www.ietf.org/rfc/rfc6749.html#section-5.1
+ */
+ account?: AccountCallback
/**
* The CSRF protection performed on the callback endpoint.
* @default ["pkce"]
@@ -190,7 +207,11 @@ export interface OAuth2Config
options?: OAuthUserConfig
}
-/** TODO: Document */
+/**
+ * Extension of the {@link OAuth2Config}.
+ *
+ * @see https://openid.net/specs/openid-connect-core-1_0.html
+ */
export interface OIDCConfig
extends Omit, "type" | "checks"> {
type: "oidc"
@@ -204,6 +225,7 @@ export type OAuthEndpointType = "authorization" | "token" | "userinfo"
/**
* We parsed `authorization`, `token` and `userinfo`
* to always contain a valid `URL`, with the params
+ * @internal
*/
export type OAuthConfigInternal = Omit<
OAuthConfig,
@@ -229,7 +251,10 @@ export type OAuthConfigInternal = Omit<
*
*/
redirectProxyUrl?: OAuth2Config["redirectProxyUrl"]
-} & Pick>, "clientId" | "checks" | "profile">
+} & Pick<
+ Required>,
+ "clientId" | "checks" | "profile" | "account"
+ >
export type OIDCConfigInternal = OAuthConfigInternal & {
checks: OIDCConfig["checks"]
diff --git a/packages/core/src/providers/okta.ts b/packages/core/src/providers/okta.ts
index 2ab77390..3028e2d9 100644
--- a/packages/core/src/providers/okta.ts
+++ b/packages/core/src/providers/okta.ts
@@ -1,13 +1,11 @@
/**
*
*
Built-in Okta integration.
- * TODO: SVG LOGO
*
*
*
*
*
- * ---
* @module providers/okta
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -49,9 +47,15 @@ export interface OktaProfile extends Record {
/**
* Add Okta login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/okta
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Okta from "@auth/core/providers/okta"
*
@@ -61,11 +65,11 @@ export interface OktaProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Okta OAuth documentation](https://developer.okta.com/docs/reference/api/oidc)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Okta provider is
* based on the [Open ID Connect](https://openid.net/specs/openid-connect-core-1_0.html) specification.
diff --git a/packages/core/src/providers/onelogin.ts b/packages/core/src/providers/onelogin.ts
index 5bd059d1..64699d21 100644
--- a/packages/core/src/providers/onelogin.ts
+++ b/packages/core/src/providers/onelogin.ts
@@ -1,13 +1,11 @@
/**
*
*
Built-in OneLogin integration.
- * TODO: SVG LOGO
*
*
*
*
*
- * ---
* @module providers/onelogin
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -15,9 +13,15 @@ import type { OAuthConfig, OAuthUserConfig } from "./index.js"
/**
* Add OneLogin login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/onelogin
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import OneLogin from "@auth/core/providers/onelogin"
*
@@ -27,11 +31,11 @@ import type { OAuthConfig, OAuthUserConfig } from "./index.js"
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [OneLogin OAuth documentation](https://example.com)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the OneLogin provider is
* based on the [Open ID Connect](https://openid.net/specs/openid-connect-core-1_0.html) specification.
diff --git a/packages/core/src/providers/osso.ts b/packages/core/src/providers/osso.ts
index 0bc0a868..d02bf6f0 100644
--- a/packages/core/src/providers/osso.ts
+++ b/packages/core/src/providers/osso.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/osso
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -14,9 +13,15 @@ import type { OAuthConfig, OAuthUserConfig } from "./index.js"
/**
* Add Osso login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/osso
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Osso from "@auth/core/providers/osso"
*
@@ -26,7 +31,7 @@ import type { OAuthConfig, OAuthUserConfig } from "./index.js"
* })
* ```
*
- * ## Resources
+ * ### Resources
* Osso is an open source service that handles SAML authentication against Identity Providers, normalizes profiles, and makes those profiles available to you in an OAuth 2.0 code grant flow.
*
* - If you don't yet have an Osso instance, you can use [Osso's Demo App](https://demo.ossoapp.com) for your testing purposes. For documentation on deploying an Osso instance, see https://ossoapp.com/docs/deploy/overview/
@@ -37,7 +42,7 @@ import type { OAuthConfig, OAuthUserConfig } from "./index.js"
* See Osso's complete configuration and testing documentation at https://ossoapp.com/docs/configure/overview
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Osso provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/osu.ts b/packages/core/src/providers/osu.ts
index 6c22cbb5..1e4bdd85 100644
--- a/packages/core/src/providers/osu.ts
+++ b/packages/core/src/providers/osu.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/osu
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -63,9 +62,15 @@ export interface OsuProfile extends OsuUserCompact, Record {
/**
* Add Osu login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/osu
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Osu! from "@auth/core/providers/osu"
*
@@ -75,12 +80,12 @@ export interface OsuProfile extends OsuUserCompact, Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Osu OAuth documentation](https://osu.ppy.sh/docs/index.html#authentication)
* - [Osu app console](https://osu.ppy.sh/home/account/edit#new-oauth-application)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Osu provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/patreon.ts b/packages/core/src/providers/patreon.ts
index c59248ae..837c71dc 100644
--- a/packages/core/src/providers/patreon.ts
+++ b/packages/core/src/providers/patreon.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/patreon
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -21,9 +20,15 @@ export interface PatreonProfile extends Record {
/**
* Add Patreon login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/patreon
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Patreon from "@auth/core/providers/patreon"
*
@@ -33,13 +38,13 @@ export interface PatreonProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Patreon OAuth documentation](https://docs.patreon.com/#apiv2-oauth)
* - [Patreon Platform](https://www.patreon.com/portal/registration/register-clients)
* - [ApiV2 Scopes](https://docs.patreon.com/#scopes)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Patreon provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/pinterest.ts b/packages/core/src/providers/pinterest.ts
index 3471d75e..92670c30 100644
--- a/packages/core/src/providers/pinterest.ts
+++ b/packages/core/src/providers/pinterest.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/pinterest
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -21,9 +20,15 @@ export interface PinterestProfile extends Record {
/**
* Add Pinterest login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/pinterest
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Pinterest from "@auth/core/providers/pinterest"
*
@@ -33,23 +38,23 @@ export interface PinterestProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Pinterest OAuth documentation](https://developers.pinterest.com/docs/getting-started/authentication/)
* - [Pinterest app console](https://developers.pinterest.com/apps/)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Pinterest provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
*
- *
+ *
* :::tip
- *
+ *
* To use in production, make sure the app has standard API access and not trial access
- *
+ *
* :::
- *
+ *
* :::tip
*
* The Pinterest provider comes with a [default configuration](https://github.com/nextauthjs/next-auth/blob/main/packages/core/src/providers/pinterest.ts).
diff --git a/packages/core/src/providers/pipedrive.ts b/packages/core/src/providers/pipedrive.ts
index 0c4bd35f..1d9ac8b9 100644
--- a/packages/core/src/providers/pipedrive.ts
+++ b/packages/core/src/providers/pipedrive.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/pipedrive
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -49,9 +48,15 @@ export interface PipedriveProfile extends Record {
/**
* Add Pipedrive login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/pipedrive
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Pipedrive from "@auth/core/providers/pipedrive"
*
@@ -61,11 +66,11 @@ export interface PipedriveProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Pipedrive OAuth documentation](https://pipedrive.readme.io/docs/marketplace-oauth-authorization)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Pipedrive provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/reddit.ts b/packages/core/src/providers/reddit.ts
index 72fd54b2..15d7e0e0 100644
--- a/packages/core/src/providers/reddit.ts
+++ b/packages/core/src/providers/reddit.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/reddit
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -14,9 +13,15 @@ import type { OAuthConfig, OAuthUserConfig } from "./index.js"
/**
* Add Reddit login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/reddit
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Reddit from "@auth/core/providers/reddit"
*
@@ -26,12 +31,12 @@ import type { OAuthConfig, OAuthUserConfig } from "./index.js"
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Reddit API documentation](https://www.reddit.com/dev/api/)
* - [Reddit app console](https://www.reddit.com/prefs/apps/ )
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Reddit provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/salesforce.ts b/packages/core/src/providers/salesforce.ts
index ec1fe419..ca6c336c 100644
--- a/packages/core/src/providers/salesforce.ts
+++ b/packages/core/src/providers/salesforce.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/saleforce
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -21,9 +20,15 @@ export interface SalesforceProfile extends Record {
/**
* Add SaleForce login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/saleforce
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import SaleForce from "@auth/core/providers/saleforce"
*
@@ -33,11 +38,11 @@ export interface SalesforceProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [SaleForce OAuth documentation](https://help.salesforce.com/articleView?id=remoteaccess_authenticate.htm&type=5)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the SaleForce provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/slack.ts b/packages/core/src/providers/slack.ts
index bb298718..4675c731 100644
--- a/packages/core/src/providers/slack.ts
+++ b/packages/core/src/providers/slack.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/slack
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -46,9 +45,15 @@ export interface SlackProfile extends Record {
/**
* Add Slack login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/slack
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Slack from "@auth/core/providers/slack"
*
@@ -58,19 +63,19 @@ export interface SlackProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Slack OAuth documentation](https://api.slack.com/authentication https://api.slack.com/docs/sign-in-with-slack)
* - [Slack app console](https://api.slack.com/apps)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Slack provider is
* based on the [Open ID Connect](https://openid.net/specs/openid-connect-core-1_0.html) specification.
*
* :::danger
*
- * Slack requires that the redirect URL of your app uses https, even for local development.
+ * Slack requires that the redirect URL of your app uses https, even for local development.
* An easy workaround for this is using a service like [ngrok](https://ngrok.com/) that creates a secure tunnel to your app, using https. Remember to set the url as `NEXTAUTH_URL` as well.
*
* :::
diff --git a/packages/core/src/providers/spotify.ts b/packages/core/src/providers/spotify.ts
index 5247506a..a90b55fa 100644
--- a/packages/core/src/providers/spotify.ts
+++ b/packages/core/src/providers/spotify.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/spotify
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -25,9 +24,15 @@ export interface SpotifyProfile extends Record {
/**
* Add Spotify login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/spotify
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Spotify from "@auth/core/providers/spotify"
*
@@ -37,12 +42,12 @@ export interface SpotifyProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Spotify OAuth documentation](https://developer.spotify.com/documentation/general/guides/authorization-guide)
* - [Spotify app console](https://developer.spotify.com/dashboard/applications)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Spotify provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/strava.ts b/packages/core/src/providers/strava.ts
index f7e07c00..a67ee7df 100644
--- a/packages/core/src/providers/strava.ts
+++ b/packages/core/src/providers/strava.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/strava
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -21,9 +20,15 @@ export interface StravaProfile extends Record {
/**
* Add Strava login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/strava
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Strava from "@auth/core/providers/strava"
*
@@ -33,11 +38,11 @@ export interface StravaProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Strava API documentation](http://developers.strava.com/docs/reference/)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Strava provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/todoist.ts b/packages/core/src/providers/todoist.ts
index 22c7d3ac..d21251f4 100644
--- a/packages/core/src/providers/todoist.ts
+++ b/packages/core/src/providers/todoist.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/todoist
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -24,9 +23,15 @@ interface TodoistProfile extends Record {
/**
* Add Todoist login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/todoist
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Todoist from "@auth/core/providers/todoist"
*
@@ -36,12 +41,12 @@ interface TodoistProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Todoist OAuth documentation](https://developer.todoist.com/guides/#oauth)
* - [Todoist configuration](https://developer.todoist.com/appconsole.html)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Todoist provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/trakt.ts b/packages/core/src/providers/trakt.ts
index 67e585da..c4bd7b83 100644
--- a/packages/core/src/providers/trakt.ts
+++ b/packages/core/src/providers/trakt.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/trakt
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -29,9 +28,15 @@ export interface TraktUser extends Record {
/**
* Add Trakt login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/trakt
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Trakt from "@auth/core/providers/trakt"
*
@@ -41,15 +46,15 @@ export interface TraktUser extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Trakt OAuth documentation](https://trakt.docs.apiary.io/#reference/authentication-oauth)
- *
+ *
* If you're using the api in production by calling `api.trakt.tv`. Follow the example. If you wish to develop on Trakt's sandbox environment by calling `api-staging.trakt.tv`, change the URLs.
- *
+ *
* Start by creating an OAuth app on Trakt for production or development. Then set the Client ID and Client Secret as TRAKT_ID and TRAKT_SECRET in .env.
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Trakt provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/twitch.ts b/packages/core/src/providers/twitch.ts
index af435ec4..46972671 100644
--- a/packages/core/src/providers/twitch.ts
+++ b/packages/core/src/providers/twitch.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/twitch
*/
import type { OIDCConfig, OIDCUserConfig } from "./index.js"
@@ -21,9 +20,15 @@ export interface TwitchProfile extends Record {
/**
* Add Twitch login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/twitch
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Twitch from "@auth/core/providers/twitch"
*
@@ -33,14 +38,14 @@ export interface TwitchProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Twitch app documentation](https://dev.twitch.tv/console/apps)
- *
- * Add the following redirect URL into the console `http:///api/auth/callback/twitch`
- *
*
- * ## Notes
+ * Add the following redirect URL into the console `http:///api/auth/callback/twitch`
+ *
+ *
+ * ### Notes
*
* By default, Auth.js assumes that the Twitch provider is
* based on the [Open ID Connect](https://openid.net/specs/openid-connect-core-1_0.html) specification.
diff --git a/packages/core/src/providers/twitter.ts b/packages/core/src/providers/twitter.ts
index 2fe769ec..c3061380 100644
--- a/packages/core/src/providers/twitter.ts
+++ b/packages/core/src/providers/twitter.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/twitter
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -105,9 +104,15 @@ export interface TwitterProfile {
/**
* Add Twitter login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/twitter
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Twitter from "@auth/core/providers/twitter"
*
@@ -117,7 +122,7 @@ export interface TwitterProfile {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Twitter App documentation](https://developer.twitter.com/en/apps)
*
@@ -131,19 +136,19 @@ export interface TwitterProfile {
* })
* ```
* Keep in mind that although this change is easy, it changes how and with which of Twitter APIs you can interact with. Read the official Twitter OAuth 2 documentation for more details.
- *
- *
+ *
+ *
* :::note
- *
- * Email is currently not supported by Twitter OAuth 2.0.
+ *
+ * Email is currently not supported by Twitter OAuth 2.0.
*
* :::
- *
- * ## Notes
*
- * Twitter is currently the only built-in provider using the OAuth 1.0 spec.
+ * ### Notes
+ *
+ * Twitter is currently the only built-in provider using the OAuth 1.0 spec.
* This means that you won't receive an `access_token` or `refresh_token`, but an `oauth_token` and `oauth_token_secret` respectively. Remember to add these to your database schema, in case if you are using an [Adapter](https://authjs.dev/reference/adapters).
- *
+ *
* :::tip
*
* You must enable the "Request email address from users" option in your app permissions if you want to obtain the users email address.
diff --git a/packages/core/src/providers/united-effects.ts b/packages/core/src/providers/united-effects.ts
index 8e74c554..f8338aac 100644
--- a/packages/core/src/providers/united-effects.ts
+++ b/packages/core/src/providers/united-effects.ts
@@ -1,15 +1,13 @@
/**
*
*
Built-in United Effects integration.
- * TODO: SVG LOGO
*
*
*
*
-*
-* ---
-* @module providers/united-effects
-*/
+ *
+ * @module providers/united-effects
+ */
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
export interface UnitedEffectsProfile extends Record {
sub: string
@@ -18,9 +16,15 @@ export interface UnitedEffectsProfile extends Record {
/**
* Add United Effects login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/united-effects
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import UnitedEffects from "@auth/core/providers/united-effects"
*
@@ -30,11 +34,11 @@ export interface UnitedEffectsProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [UnitedEffects Auth.js documentation](https://docs.unitedeffects.com/integrations/nextauthjs)",
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the UnitedEffects provider is
* based on the [Open ID Connect](https://openid.net/specs/openid-connect-core-1_0.html) specification.
diff --git a/packages/core/src/providers/vk.ts b/packages/core/src/providers/vk.ts
index ffab573d..9330c82e 100644
--- a/packages/core/src/providers/vk.ts
+++ b/packages/core/src/providers/vk.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/vk
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -295,9 +294,15 @@ export interface VkProfile {
/**
* Add VK login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/vk
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import VK from "@auth/core/providers/vk"
*
@@ -307,12 +312,12 @@ export interface VkProfile {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [VK API documentation](https://vk.com/dev/first_guide)
* - [VK App configuration](https://vk.com/apps?act=manage)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the VK provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/wikimedia.ts b/packages/core/src/providers/wikimedia.ts
index f1c8bf32..3f4d8db2 100644
--- a/packages/core/src/providers/wikimedia.ts
+++ b/packages/core/src/providers/wikimedia.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/wikimedia
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -164,13 +163,18 @@ export interface WikimediaProfile extends Record {
email: string
}
-
/**
* Add Wikimedia login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/wikimedia
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Wikimedia from "@auth/core/providers/wikimedia"
*
@@ -180,30 +184,30 @@ export interface WikimediaProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Wikimedia OAuth documentation](https://www.mediawiki.org/wiki/Extension:OAuth)
*
* ## Configuration steps
* - Go to and accept the Consumer Registration doc: https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration
- * - Request a new OAuth 2.0 consumer to get the `clientId` and `clientSecret`: https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose/oauth2
+ * - Request a new OAuth 2.0 consumer to get the `clientId` and `clientSecret`: https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose/oauth2
* - Add the following redirect URL into the console: `http:///api/auth/callback/wikimedia`
- * - Do not check the box next to This consumer is only for __your username__
+ * - Do not check the box next to This consumer is only for __your username__
* - Unless you explicitly need a larger scope, feel free to select the radio button labelled User identity verification only - no ability to read pages or act on the users behalf.
- *
+ *
* After registration, you can initially test your application only with your own Wikimedia account.
* You may have to wait several days for the application to be approved for it to be used by everyone.
*
- * ## Notes
+ * ### Notes
* This provider also supports all Wikimedia projects:
* - Wikipedia
* - Wikidata
* - Wikibooks
* - Wiktionary
* - etc..
- *
+ *
* Please be aware that Wikimedia accounts do not have to have an associated email address. So you may want to add check if the user has an email address before allowing them to login.
- *
+ *
* By default, Auth.js assumes that the Wikimedia provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
*
diff --git a/packages/core/src/providers/wordpress.ts b/packages/core/src/providers/wordpress.ts
index 2979732c..21cffb3d 100644
--- a/packages/core/src/providers/wordpress.ts
+++ b/packages/core/src/providers/wordpress.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/wordpress
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -14,9 +13,15 @@ import type { OAuthConfig, OAuthUserConfig } from "./index.js"
/**
* Add WordPress login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/wordpress
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import WordPress from "@auth/core/providers/wordpress"
*
@@ -26,11 +31,11 @@ import type { OAuthConfig, OAuthUserConfig } from "./index.js"
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [WordPress OAuth documentation](https://developer.wordpress.com/docs/oauth2/)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the WordPress provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/workos.ts b/packages/core/src/providers/workos.ts
index f0f5347e..3c713416 100644
--- a/packages/core/src/providers/workos.ts
+++ b/packages/core/src/providers/workos.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/workos
*/
import type { OAuthConfig, OAuthUserConfig } from "./index.js"
@@ -35,9 +34,15 @@ export interface WorkOSProfile extends Record {
/**
* Add WorkOS login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/workos
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import WorkOS from "@auth/core/providers/workos"
*
@@ -47,19 +52,19 @@ export interface WorkOSProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [WorkOS SSO OAuth documentation](https://workos.com/docs/reference/sso)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the WorkOS provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
- *
- * WorkOS is not an identity provider itself, but, rather, a bridge to multiple single sign-on (SSO) providers.
+ *
+ * WorkOS is not an identity provider itself, but, rather, a bridge to multiple single sign-on (SSO) providers.
* As a result, we need to make some additional changes to authenticate users using WorkOS.
- *
- * In order to sign a user in using WorkOS, we need to specify which WorkOS Connection to use.
+ *
+ * In order to sign a user in using WorkOS, we need to specify which WorkOS Connection to use.
* A common way to do this is to collect the user's email address and extract the domain. This can be done using a custom login page.
* To add a custom login page, you can use the `pages` option:
* ```js title="pages/api/auth/[...nextauth].js"
@@ -67,15 +72,15 @@ export interface WorkOSProfile extends Record {
* signIn: "/auth/signin",
* }
* ```
- * We can then add a custom login page that displays an input where the user can enter their email address.
+ * We can then add a custom login page that displays an input where the user can enter their email address.
* We then extract the domain from the user's email address and pass it to the `authorizationParams` parameter on the `signIn` function:
* ```js title="pages/auth/signin.js"
* import { useState } from "react"
* import { getProviders, signIn } from "next-auth/react"
- *
+ *
* export default function SignIn({ providers }) {
* const [email, setEmail] = useState("")
- *
+ *
* return (
* <>
* {Object.values(providers).map((provider) => {
@@ -100,7 +105,7 @@ export interface WorkOSProfile extends Record {
*
* )
* }
- *
+ *
* return (
*
* signIn(provider.id)}>
@@ -112,7 +117,7 @@ export interface WorkOSProfile extends Record {
* >
* )
* }
- *
+ *
* export async function getServerSideProps(context) {
* const providers = await getProviders()
* return {
@@ -120,7 +125,7 @@ export interface WorkOSProfile extends Record {
* }
* }
* ```
- *
+ *
* :::tip
*
* The WorkOS provider comes with a [default configuration](https://github.com/nextauthjs/next-auth/blob/main/packages/core/src/providers/workos.ts).
diff --git a/packages/core/src/providers/yandex.ts b/packages/core/src/providers/yandex.ts
index 215394de..f5f544db 100644
--- a/packages/core/src/providers/yandex.ts
+++ b/packages/core/src/providers/yandex.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/yandex
*/
@@ -45,7 +44,7 @@ export interface YandexProfile {
* ID of the Yandex user's profile picture.
* Format for downloading user avatars: `https://avatars.yandex.net/get-yapic//`
* @example "https://avatars.yandex.net/get-yapic/31804/BYkogAC6AoB17bN1HKRFAyKiM4-1/islands-200"
- * Available sizes:
+ * Available sizes:
* `islands-small`: 28×28 pixels.
* `islands-34`: 34×34 pixels.
* `islands-middle`: 42×42 pixels.
@@ -99,7 +98,7 @@ export interface YandexProfile {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Yandex - Creating an OAuth app](https://yandex.com/dev/id/doc/en/register-client#create)
* - [Yandex - Manage OAuth apps](https://oauth.yandex.com/)
diff --git a/packages/core/src/providers/zitadel.ts b/packages/core/src/providers/zitadel.ts
index 94af1c03..2f8536f3 100644
--- a/packages/core/src/providers/zitadel.ts
+++ b/packages/core/src/providers/zitadel.ts
@@ -6,14 +6,13 @@
*
*
*
- * ---
* @module providers/zitadel
*/
import type { OIDCConfig, OAuthUserConfig } from "./index.js"
/**
- * The returned user profile from ZITADEL when using the profile callback. See the standard claims reference [here](https://zitadel.com/docs/apis/openidoauth/claims#standard-claims).
+ * The returned user profile from ZITADEL when using the profile callback. See the standard claims reference [here](https://zitadel.com/docs/apis/openidoauth/claims#standard-claims).
* If you need access to ZITADEL APIs or need additional information, make sure to add the corresponding scopes.
*/
export interface ZitadelProfile extends Record {
@@ -43,9 +42,15 @@ export interface ZitadelProfile extends Record {
/**
* Add ZITADEL login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/zitadel
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import ZITADEL from "@auth/core/providers/zitadel"
*
@@ -55,19 +60,19 @@ export interface ZitadelProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
* - [ZITADEL OpenID Endpoints](https://zitadel.com/docs/apis/openidoauth/endpoints)
* - [ZITADEL recommended OAuth Flows](https://docs.zitadel.com/docs/guides/integrate/oauth-recommended-flows)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the ZITADEL provider is
* based on the [Open ID Connect](https://openid.net/specs/openid-connect-core-1_0.html) specification.
- *
+ *
* The Redirect URIs used when creating the credentials must include your full domain and end in the callback path. For example:
* - For production: `https://{YOUR_DOMAIN}/api/auth/callback/zitadel`
* - For development: `http://localhost:3000/api/auth/callback/zitadel`
- *
+ *
* Make sure to enable dev mode in ZITADEL console to allow redirects for local development.
*
* :::tip
diff --git a/packages/core/src/providers/zoho.ts b/packages/core/src/providers/zoho.ts
index 09c95148..18accca9 100644
--- a/packages/core/src/providers/zoho.ts
+++ b/packages/core/src/providers/zoho.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/zoho
*/
@@ -14,9 +13,15 @@ import type { OAuthConfig, OAuthUserConfig } from "./index.js"
/**
* Add ZOHO login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/zoho
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import ZOHO from "@auth/core/providers/zoho"
*
@@ -26,12 +31,12 @@ import type { OAuthConfig, OAuthUserConfig } from "./index.js"
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Zoho OAuth 2.0 Integration Guide](https://www.zoho.com/accounts/protocol/oauth/web-server-applications.html)
* - [Zoho API Console](https://api-console.zoho.com)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the ZOHO provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/providers/zoom.ts b/packages/core/src/providers/zoom.ts
index 46f4336e..57ecdbae 100644
--- a/packages/core/src/providers/zoom.ts
+++ b/packages/core/src/providers/zoom.ts
@@ -6,7 +6,6 @@
*
*
*
- * ---
* @module providers/zoom
*/
@@ -47,9 +46,15 @@ export interface ZoomProfile extends Record {
/**
* Add Zoom login to your page.
*
- * @example
+ * ### Setup
*
- * ```js
+ * #### Callback URL
+ * ```
+ * https://example.com/api/auth/callback/zoom
+ * ```
+ *
+ * #### Configuration
+ *```js
* import Auth from "@auth/core"
* import Zoom from "@auth/core/providers/zoom"
*
@@ -59,11 +64,11 @@ export interface ZoomProfile extends Record {
* })
* ```
*
- * ## Resources
+ * ### Resources
*
* - [Zoom OAuth 2.0 Integration Guide](https://developers.zoom.us/docs/integrations/oauth/)
*
- * ## Notes
+ * ### Notes
*
* By default, Auth.js assumes that the Zoom provider is
* based on the [OAuth 2](https://www.rfc-editor.org/rfc/rfc6749.html) specification.
diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts
index 8d5a5b43..5933d9ea 100644
--- a/packages/core/src/types.ts
+++ b/packages/core/src/types.ts
@@ -116,16 +116,58 @@ export interface Account extends Partial {
providerAccountId: string
/** Provider's type for this account */
type: ProviderType
- /** id of the user this account belongs to */
+ /**
+ * id of the user this account belongs to
+ *
+ * @see https://authjs.dev/reference/adapters#user
+ */
userId?: string
+ /**
+ * Calculated value based on {@link OAuth2TokenEndpointResponse.expires_in}.
+ *
+ * It is the absolute timestamp (in seconds) when the {@link OAuth2TokenEndpointResponse.access_token} expires.
+ *
+ * This value can be used for implementing token rotation together with {@link OAuth2TokenEndpointResponse.refresh_token}.
+ *
+ * @see https://authjs.dev/guides/basics/refresh-token-rotation#database-strategy
+ * @see https://www.rfc-editor.org/rfc/rfc6749#section-5.1
+ */
+ expires_at?: number
}
-/** The OAuth profile returned from your provider */
+/**
+ * The user info returned from your OAuth provider.
+ *
+ * @see https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims
+ */
export interface Profile {
- sub?: string | null
- name?: string | null
- email?: string | null
- image?: string | null
+ sub: string
+ name?: string
+ given_name?: string
+ family_name?: string
+ middle_name?: string
+ nickname?: string
+ preferred_username?: string
+ profile?: string
+ picture?: string
+ website?: string
+ email?: string
+ email_verified?: boolean
+ gender?: string
+ birthdate?: string
+ zoneinfo?: string
+ locale?: string
+ phone_number?: string
+ updated_at?: number
+ address?: {
+ formatted?: string
+ street_address?: string
+ locality?: string
+ region?: string
+ postal_code?: string
+ country?: string
+ }
+ [claim: string]: unknown
}
/** [Documentation](https://authjs.dev/guides/basics/callbacks) */
@@ -262,7 +304,7 @@ export interface EventCallbacks {
/**
* The message object will contain one of these depending on
* if you use JWT or database persisted sessions:
- * - `token`: The JWT token for this session.
+ * - `token`: The JWT for this session.
* - `session`: The session object from your adapter that is being ended.
*/
signOut: (
@@ -280,7 +322,7 @@ export interface EventCallbacks {
/**
* The message object will contain one of these depending on
* if you use JWT or database persisted sessions:
- * - `token`: The JWT token for this session.
+ * - `token`: The JWT for this session.
* - `session`: The session object from your adapter.
*/
session: (message: { session: Session; token: JWT }) => Awaitable
@@ -385,15 +427,40 @@ export type InternalProvider = (T extends "oauth"
callbackUrl: string
}
+/**
+ * Supported actions by Auth.js. Each action map to a REST API endpoint.
+ * Some actions have a `GET` and `POST` variant, depending on if the action
+ * changes the state of the server.
+ *
+ * - **`"callback"`**:
+ * - **`GET`**: Handles the callback from an [OAuth provider](https://authjs.dev/reference/core/providers_oauth).
+ * - **`POST`**: Handles the callback from a [Credentials provider](https://authjs.dev/reference/core/providers_credentials).
+ * - **`"csrf"`**: Returns the raw CSRF token, which is saved in a cookie (encrypted).
+ * It is used for CSRF protection, implementing the [double submit cookie](https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#double-submit-cookie) technique.
+ * :::note
+ * Some frameworks have built-in CSRF protection and can therefore disable this action. In this case, the corresponding endpoint will return a 404 response. Read more at [`skipCSRFCheck`](https://authjs.dev/reference/core#skipcsrfcheck).
+ * _⚠ We don't recommend manually disabling CSRF protection, unless you know what you're doing._
+ * :::
+ * - **`"error"`**: Renders the built-in error page.
+ * - **`"providers"`**: Returns a client-safe list of all configured providers.
+ * - **`"session"`**: Returns the user's session if it exists, otherwise `null`.
+ * - **`"signin"`**:
+ * - **`GET`**: Renders the built-in sign-in page.
+ * - **`POST`**: Initiates the sign-in flow.
+ * - **`"signout"`**:
+ * - **`GET`**: Renders the built-in sign-out page.
+ * - **`POST`**: Initiates the sign-out flow. This will invalidate the user's session (deleting the cookie, and if there is a session in the database, it will be deleted as well).
+ * - **`"verify-request"`**: Renders the built-in verification request page.
+ */
export type AuthAction =
+ | "callback"
+ | "csrf"
+ | "error"
| "providers"
| "session"
- | "csrf"
| "signin"
| "signout"
- | "callback"
| "verify-request"
- | "error"
/** @internal */
export interface RequestInternal {
diff --git a/packages/next-auth/src/jwt/types.ts b/packages/next-auth/src/jwt/types.ts
index ecd0e2a9..58242fc8 100644
--- a/packages/next-auth/src/jwt/types.ts
+++ b/packages/next-auth/src/jwt/types.ts
@@ -21,7 +21,7 @@ export interface JWTEncodeParams {
secret: string | Buffer
/**
* The maximum age of the NextAuth.js issued JWT in seconds.
- * @default 30 * 24 * 30 * 60 // 30 days
+ * @default 30 * 24 * 60 * 60 // 30 days
*/
maxAge?: number
}
@@ -42,7 +42,7 @@ export interface JWTOptions {
secret: string
/**
* The maximum age of the NextAuth.js issued JWT in seconds.
- * @default 30 * 24 * 30 * 60 // 30 days
+ * @default 30 * 24 * 60 * 60 // 30 days
*/
maxAge: number
/** Override this method to control the NextAuth.js issued JWT encoding. */
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 633b62a3..29a999cf 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -423,7 +423,7 @@ importers:
'@next-auth/tsconfig': workspace:*
'@types/uuid': ^8.3.3
jest: ^27.4.3
- neo4j-driver: ^4.4.0
+ neo4j-driver: ^5.7.0
next-auth: workspace:*
uuid: ^8.3.2
dependencies:
@@ -433,7 +433,7 @@ importers:
'@next-auth/tsconfig': link:../tsconfig
'@types/uuid': 8.3.4
jest: 27.5.1
- neo4j-driver: 4.4.6
+ neo4j-driver: 5.7.0
next-auth: link:../next-auth
packages/adapter-pouchdb:
@@ -5196,13 +5196,6 @@ packages:
regenerator-runtime: 0.13.11
dev: true
- /@babel/runtime/7.18.3:
- resolution: {integrity: sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==}
- engines: {node: '>=6.9.0'}
- dependencies:
- regenerator-runtime: 0.13.9
- dev: true
-
/@babel/runtime/7.20.13:
resolution: {integrity: sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==}
engines: {node: '>=6.9.0'}
@@ -17739,7 +17732,7 @@ packages:
express-basic-auth: 1.2.1
lodash: 4.17.21
mailparser: 2.8.1
- moment: 2.29.3
+ moment: 2.29.4
smtp-server: 3.11.0
transitivePeerDependencies:
- supports-color
@@ -20197,7 +20190,7 @@ packages:
mute-stream: 0.0.8
ora: 5.4.1
run-async: 2.4.1
- rxjs: 7.6.0
+ rxjs: 7.8.1
string-width: 4.2.3
strip-ansi: 6.0.1
through: 2.3.8
@@ -20218,7 +20211,7 @@ packages:
mute-stream: 0.0.8
ora: 6.1.2
run-async: 2.4.1
- rxjs: 7.6.0
+ rxjs: 7.8.1
string-width: 5.1.2
strip-ansi: 7.0.1
through: 2.3.8
@@ -24786,25 +24779,24 @@ packages:
/neo-async/2.6.2:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
- /neo4j-driver-bolt-connection/4.4.6:
- resolution: {integrity: sha512-ZjYVwHk8oMeRtBf4j/1CmA/7t88OHl7WOiZtFnbdU3LHkfnhtrovLk7sU1zGK60f6AmaQrA9lAh1rpxwDfri5Q==}
+ /neo4j-driver-bolt-connection/5.7.0:
+ resolution: {integrity: sha512-TMXNJuwEEYBqzyKsiyfF2DDaG/eV13y86nhxbXICcq9/1/j36OJx2zEuhzk1XstLYFD0WioSJZ3khV1+3aVRkw==}
dependencies:
buffer: 6.0.3
- neo4j-driver-core: 4.4.6
+ neo4j-driver-core: 5.7.0
string_decoder: 1.3.0
dev: true
- /neo4j-driver-core/4.4.6:
- resolution: {integrity: sha512-8Pc5lLeWwrxjrEGyJm8QASfguKK90i4YxB4Unz1FWV1z3xRq2xFtLhNl6PSa5Kx1VtKS5dhiwHlJArBJJEQjZA==}
+ /neo4j-driver-core/5.7.0:
+ resolution: {integrity: sha512-q/mP1oDtt562+8uSMZZJJ8k8MNGeghTegzmmDCo9v4LDxuq+wkaKQ3tHm92o1xemuko+uyqlX8lU/844rX3T4A==}
dev: true
- /neo4j-driver/4.4.6:
- resolution: {integrity: sha512-KzTEQ/PYuaVkeEuQmr8jZm0cFLlK/zAAMe3IkhxWj56Tgwn2nT2RASPrqwvyEVfk8jg6xS4U1Fx2VABmkO4cdQ==}
+ /neo4j-driver/5.7.0:
+ resolution: {integrity: sha512-Le5lgMERk0nIHPHQa18DRifrzXpPYkJEr9Sz/bxPQ8gbWFqTTL292LtJ/qM8RjByaRH2C923dKk2Ni8b0mzLNQ==}
dependencies:
- '@babel/runtime': 7.18.3
- neo4j-driver-bolt-connection: 4.4.6
- neo4j-driver-core: 4.4.6
- rxjs: 6.6.7
+ neo4j-driver-bolt-connection: 5.7.0
+ neo4j-driver-core: 5.7.0
+ rxjs: 7.8.1
dev: true
/netmask/2.0.2:
@@ -28151,10 +28143,6 @@ packages:
/regenerator-runtime/0.13.11:
resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==}
- /regenerator-runtime/0.13.9:
- resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==}
- dev: true
-
/regenerator-transform/0.15.0:
resolution: {integrity: sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==}
dependencies:
@@ -28642,6 +28630,7 @@ packages:
engines: {npm: '>=2.0.0'}
dependencies:
tslib: 1.14.1
+ dev: false
/rxjs/7.5.5:
resolution: {integrity: sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw==}
@@ -28649,8 +28638,8 @@ packages:
tslib: 2.4.1
dev: true
- /rxjs/7.6.0:
- resolution: {integrity: sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ==}
+ /rxjs/7.8.1:
+ resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==}
dependencies:
tslib: 2.4.1
dev: true
@@ -32319,7 +32308,7 @@ packages:
joi: 17.7.0
lodash: 4.17.21
minimist: 1.2.6
- rxjs: 7.6.0
+ rxjs: 7.8.1
transitivePeerDependencies:
- debug
dev: true
@@ -32333,7 +32322,7 @@ packages:
joi: 17.7.0
lodash: 4.17.21
minimist: 1.2.6
- rxjs: 7.6.0
+ rxjs: 7.8.1
transitivePeerDependencies:
- debug
dev: true