diff --git a/CHANGELOG.md b/CHANGELOG.md index b54aee54f..e03c49b79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [v2.0.1](https://github.com/auth0/nextjs-auth0/tree/v2.0.1) (2022-12-09) +[Full Changelog](https://github.com/auth0/nextjs-auth0/compare/v2.0.0...v2.0.1) + +**Fixed** +- afterCallback return type fix [\#954](https://github.com/auth0/nextjs-auth0/pull/954) ([alexmalev](https://github.com/alexmalev)) +- fix/rerenders: useMemo to avoid unnecessary rerenders [\#945](https://github.com/auth0/nextjs-auth0/pull/945) ([stavros-liaskos](https://github.com/stavros-liaskos)) + ## [v2.0.0](https://github.com/auth0/nextjs-auth0/tree/v2.0.0) (2022-12-01) [Full Changelog](https://github.com/auth0/nextjs-auth0/compare/v1.9.2...v2.0.0) diff --git a/docs/classes/client_use_user.requesterror.html b/docs/classes/client_use_user.requesterror.html index 0efb66ff0..59f7e3277 100644 --- a/docs/classes/client_use_user.requesterror.html +++ b/docs/classes/client_use_user.requesterror.html @@ -122,7 +122,7 @@
constructor
Optional error
Optional errorDescription
errorDescription: string
diff --git a/docs/classes/index.missingstatecookieerror.html b/docs/classes/index.missingstatecookieerror.html
index 29035ccfc..935d390db 100644
--- a/docs/classes/index.missingstatecookieerror.html
+++ b/docs/classes/index.missingstatecookieerror.html
@@ -111,7 +111,7 @@ message: string = 'Missing state cookie from login request (check login URL, callback URL and cookie config).'
diff --git a/docs/classes/index.missingstateparamerror.html b/docs/classes/index.missingstateparamerror.html
index 8861b62c0..a723f12a7 100644
--- a/docs/classes/index.missingstateparamerror.html
+++ b/docs/classes/index.missingstateparamerror.html
@@ -111,7 +111,7 @@ message: string = 'Missing state parameter in Authorization Response.'
diff --git a/docs/classes/index.sessioncache.html b/docs/classes/index.sessioncache.html
index d4255a2c0..159b60526 100644
--- a/docs/classes/index.sessioncache.html
+++ b/docs/classes/index.sessioncache.html
@@ -129,7 +129,7 @@
accessToken: string
@@ -163,7 +163,7 @@
constructor
Returns MissingStateCookieError
@@ -127,7 +127,7 @@Static message
constructor
Returns MissingStateParamError
@@ -127,7 +127,7 @@Static message
constructor
Type parameters
@@ -168,7 +168,7 @@create
Parameters
@@ -198,7 +198,7 @@delete
Parameters
@@ -225,7 +225,7 @@fromTokenSet
Parameters
@@ -248,7 +248,7 @@get
Parameters
@@ -275,7 +275,7 @@getIdToken
Parameters
@@ -302,7 +302,7 @@isAuthenticated
Parameters
@@ -328,7 +328,7 @@save
Parameters
@@ -354,7 +354,7 @@set
Parameters
diff --git a/docs/classes/session_session.default.html b/docs/classes/session_session.default.html index 657c9514e..34810c246 100644 --- a/docs/classes/session_session.default.html +++ b/docs/classes/session_session.default.html @@ -126,7 +126,7 @@constructor
Parameters
@@ -148,7 +148,7 @@Optional accessToken
Optional accessToken
accessTokenExpiresAt: number
@@ -178,7 +178,7 @@
Optional accessToken
accessTokenScope: string
@@ -193,7 +193,7 @@ idToken: string
@@ -208,7 +208,7 @@ Token: string
@@ -225,7 +225,7 @@ user: Claims
diff --git a/docs/classes/utils_errors.accesstokenerror.html b/docs/classes/utils_errors.accesstokenerror.html
index f6e6d8dab..c268daa2a 100644
--- a/docs/classes/utils_errors.accesstokenerror.html
+++ b/docs/classes/utils_errors.accesstokenerror.html
@@ -132,7 +132,7 @@
Optional idToken
Optional refreshToken
refreshuser
constructor
Parameters
@@ -161,7 +161,7 @@Optional
@@ -181,7 +181,7 @@
@@ -200,7 +200,7 @@
@@ -216,7 +216,7 @@
Inherited from AuthError.cause
-- Defined in src/utils/errors.ts:57
+ - Defined in src/utils/errors.ts:57
Readonly code
Readonly name
Optional
diff --git a/docs/classes/utils_errors.autherror.html b/docs/classes/utils_errors.autherror.html
index a909281c2..cf9fe60ee 100644
--- a/docs/classes/utils_errors.autherror.html
+++ b/docs/classes/utils_errors.autherror.html
@@ -135,7 +135,7 @@
@@ -176,7 +176,7 @@ code: string
@@ -195,7 +195,7 @@
@@ -210,7 +210,7 @@
diff --git a/docs/classes/utils_errors.callbackhandlererror.html b/docs/classes/utils_errors.callbackhandlererror.html
index 8eacdb910..bdae86883 100644
--- a/docs/classes/utils_errors.callbackhandlererror.html
+++ b/docs/classes/utils_errors.callbackhandlererror.html
@@ -139,7 +139,7 @@
Inherited from AuthError.status
-- Defined in src/utils/errors.ts:62
+ - Defined in src/utils/errors.ts:62
constructor
Parameters
@@ -157,7 +157,7 @@Optional cause: Error
Readonly code
Readonly name
Optional status: number
constructor
Parameters
@@ -162,7 +162,7 @@Optional
@@ -182,7 +182,7 @@
@@ -201,7 +201,7 @@
@@ -217,7 +217,7 @@
Inherited from HandlerError.cause
-- Defined in src/utils/errors.ts:57
+ - Defined in src/utils/errors.ts:57
Readonly code
Readonly name
Optional
@@ -232,7 +232,7 @@
diff --git a/docs/classes/utils_errors.handlererror.html b/docs/classes/utils_errors.handlererror.html
index 88f0c5b1d..e1ad9830d 100644
--- a/docs/classes/utils_errors.handlererror.html
+++ b/docs/classes/utils_errors.handlererror.html
@@ -152,7 +152,7 @@
Inherited from HandlerError.status
-- Defined in src/utils/errors.ts:62
+ - Defined in src/utils/errors.ts:62
Static code: string = 'ERR_CALLBACK_HANDLER_FAILURE'
constructor
Parameters
@@ -175,7 +175,7 @@Optional
@@ -195,7 +195,7 @@
@@ -214,7 +214,7 @@
@@ -230,7 +230,7 @@
Inherited from AuthError.cause
-- Defined in src/utils/errors.ts:57
+ - Defined in src/utils/errors.ts:57
Readonly code
Readonly name
Optional
diff --git a/docs/classes/utils_errors.loginhandlererror.html b/docs/classes/utils_errors.loginhandlererror.html
index 7b431ab8a..e8d98f246 100644
--- a/docs/classes/utils_errors.loginhandlererror.html
+++ b/docs/classes/utils_errors.loginhandlererror.html
@@ -127,7 +127,7 @@
Inherited from AuthError.status
-- Defined in src/utils/errors.ts:62
+ - Defined in src/utils/errors.ts:62
constructor
Parameters
@@ -150,7 +150,7 @@Optional
@@ -170,7 +170,7 @@
@@ -189,7 +189,7 @@
@@ -205,7 +205,7 @@
Inherited from HandlerError.cause
-- Defined in src/utils/errors.ts:57
+ - Defined in src/utils/errors.ts:57
Readonly code
Readonly name
Optional
@@ -220,7 +220,7 @@
diff --git a/docs/classes/utils_errors.logouthandlererror.html b/docs/classes/utils_errors.logouthandlererror.html
index 3ac9770d0..2a33e6a77 100644
--- a/docs/classes/utils_errors.logouthandlererror.html
+++ b/docs/classes/utils_errors.logouthandlererror.html
@@ -127,7 +127,7 @@
Inherited from HandlerError.status
-- Defined in src/utils/errors.ts:62
+ - Defined in src/utils/errors.ts:62
Static code: string = 'ERR_LOGIN_HANDLER_FAILURE'
constructor
Parameters
@@ -150,7 +150,7 @@Optional
@@ -170,7 +170,7 @@
@@ -189,7 +189,7 @@
@@ -205,7 +205,7 @@
Inherited from HandlerError.cause
-- Defined in src/utils/errors.ts:57
+ - Defined in src/utils/errors.ts:57
Readonly code
Readonly name
Optional
@@ -220,7 +220,7 @@
diff --git a/docs/classes/utils_errors.profilehandlererror.html b/docs/classes/utils_errors.profilehandlererror.html
index 379fc1ee0..9ac8e0fd9 100644
--- a/docs/classes/utils_errors.profilehandlererror.html
+++ b/docs/classes/utils_errors.profilehandlererror.html
@@ -127,7 +127,7 @@
Inherited from HandlerError.status
-- Defined in src/utils/errors.ts:62
+ - Defined in src/utils/errors.ts:62
Static code: string = 'ERR_LOGOUT_HANDLER_FAILURE'
constructor
Parameters
@@ -150,7 +150,7 @@Optional
@@ -170,7 +170,7 @@
@@ -189,7 +189,7 @@
@@ -205,7 +205,7 @@
Inherited from HandlerError.cause
-- Defined in src/utils/errors.ts:57
+ - Defined in src/utils/errors.ts:57
Readonly code
Readonly name
Optional
@@ -220,7 +220,7 @@
diff --git a/docs/enums/utils_errors.accesstokenerrorcode.html b/docs/enums/utils_errors.accesstokenerrorcode.html
index 5d993ca87..8fa004d68 100644
--- a/docs/enums/utils_errors.accesstokenerrorcode.html
+++ b/docs/enums/utils_errors.accesstokenerrorcode.html
@@ -99,7 +99,7 @@ EXPIRED_ACCESS_TOKEN: = "ERR_EXPIRED_ACCESS_TOKEN"
@@ -109,7 +109,7 @@ FAILED_REFRESH_GRANT: = "ERR_FAILED_REFRESH_GRANT"
@@ -119,7 +119,7 @@ INSUFFICIENT_SCOPE: = "ERR_INSUFFICIENT_SCOPE"
@@ -129,7 +129,7 @@ MISSING_ACCESS_TOKEN: = "ERR_MISSING_ACCESS_TOKEN"
@@ -139,7 +139,7 @@ MISSING_REFRESH_TOKEN: = "ERR_MISSING_REFRESH_TOKEN"
@@ -149,7 +149,7 @@ MISSING_SESSION: = "ERR_MISSING_SESSION"
diff --git a/docs/interfaces/client_use_user.userprofile.html b/docs/interfaces/client_use_user.userprofile.html
index 54abda603..8d4033dfc 100644
--- a/docs/interfaces/client_use_user.userprofile.html
+++ b/docs/interfaces/client_use_user.userprofile.html
@@ -118,7 +118,7 @@ email: null | string
@@ -128,7 +128,7 @@
Inherited from HandlerError.status
-- Defined in src/utils/errors.ts:62
+ - Defined in src/utils/errors.ts:62
Static code: string = 'ERR_PROFILE_HANDLER_FAILURE'
EXPIRED_ACCESS_TOKEN
FAILED_REFRESH_GRANT
INSUFFICIENT_SCOPE
MISSING_ACCESS_TOKEN
MISSING_REFRESH_TOKEN
MISSING_SESSION
Optional email
Optional email_verified
email_verified: null | boolean
@@ -138,7 +138,7 @@ name: null | string
@@ -148,7 +148,7 @@ nickname: null | string
@@ -158,7 +158,7 @@ org_id: null | string
@@ -168,7 +168,7 @@ picture: null | string
@@ -178,7 +178,7 @@ sub: null | string
@@ -188,7 +188,7 @@ updated_at: null | string
diff --git a/docs/interfaces/client_with_page_auth_required.userprops.html b/docs/interfaces/client_with_page_auth_required.userprops.html
index a9fbeefdc..f2240415f 100644
--- a/docs/interfaces/client_with_page_auth_required.userprops.html
+++ b/docs/interfaces/client_with_page_auth_required.userprops.html
@@ -95,7 +95,7 @@ user: UserProfile
diff --git a/docs/interfaces/client_with_page_auth_required.withpageauthrequiredoptions.html b/docs/interfaces/client_with_page_auth_required.withpageauthrequiredoptions.html
index c79e80504..57ae9be09 100644
--- a/docs/interfaces/client_with_page_auth_required.withpageauthrequiredoptions.html
+++ b/docs/interfaces/client_with_page_auth_required.withpageauthrequiredoptions.html
@@ -104,7 +104,7 @@ onError: (error: Error) => Element
@@ -144,7 +144,7 @@
@@ -178,7 +178,7 @@ returnTo: string
diff --git a/docs/interfaces/config.authorizationparameters.html b/docs/interfaces/config.authorizationparameters.html
index 85e6ca58f..c3ac109b1 100644
--- a/docs/interfaces/config.authorizationparameters.html
+++ b/docs/interfaces/config.authorizationparameters.html
@@ -111,7 +111,7 @@
diff --git a/docs/interfaces/config.baseconfig.html b/docs/interfaces/config.baseconfig.html
index f49b2b5cf..a51447963 100644
--- a/docs/interfaces/config.baseconfig.html
+++ b/docs/interfaces/config.baseconfig.html
@@ -111,7 +111,7 @@ auth0Logout: boolean
@@ -127,7 +127,7 @@ authorizationParams: AuthorizationParameters
@@ -160,7 +160,7 @@ baseURL: string
@@ -178,7 +178,7 @@ clientID: string
@@ -194,7 +194,7 @@ Secret: string
@@ -211,7 +211,7 @@ clockTolerance: number
@@ -226,7 +226,7 @@ enableTelemetry: boolean
@@ -243,7 +243,7 @@ getLoginState: (req: IncomingMessage, options: LoginOptions) => Record<string, any>
@@ -294,7 +294,7 @@ httpTimeout: number
@@ -311,7 +311,7 @@ idTokenSigningAlg: string
@@ -327,7 +327,7 @@ identityClaimFilter: string[]
@@ -344,7 +344,7 @@ idpLogout: boolean
@@ -360,7 +360,7 @@ issuerBaseURL: string
@@ -377,7 +377,7 @@ legacySameSiteCookie: boolean
@@ -394,7 +394,7 @@ routes: { callback: string; postLogoutRedirect: string }
@@ -435,7 +435,7 @@ secret: string | string[]
@@ -454,7 +454,7 @@ session: SessionConfig
diff --git a/docs/interfaces/config.cookieconfig.html b/docs/interfaces/config.cookieconfig.html
index e480ff56d..cc11fcec5 100644
--- a/docs/interfaces/config.cookieconfig.html
+++ b/docs/interfaces/config.cookieconfig.html
@@ -107,7 +107,7 @@ domain: string
@@ -123,7 +123,7 @@ httpOnly: boolean
@@ -140,7 +140,7 @@ path: string
@@ -158,7 +158,7 @@ sameSite: "lax" | "strict" | "none"
@@ -175,7 +175,7 @@ secure: boolean
@@ -192,7 +192,7 @@ transient: boolean
diff --git a/docs/interfaces/config.nextconfig.html b/docs/interfaces/config.nextconfig.html
index 4f9bdcde5..ada995a79 100644
--- a/docs/interfaces/config.nextconfig.html
+++ b/docs/interfaces/config.nextconfig.html
@@ -103,7 +103,7 @@
@@ -120,7 +120,7 @@ organization: string
@@ -138,7 +138,7 @@ routes: { callback: string; login: string; unauthorized: string }
diff --git a/docs/interfaces/config.sessionconfig.html b/docs/interfaces/config.sessionconfig.html
index ebcedbaa8..3c18bacda 100644
--- a/docs/interfaces/config.sessionconfig.html
+++ b/docs/interfaces/config.sessionconfig.html
@@ -107,7 +107,7 @@ absoluteDuration: number | boolean
@@ -126,7 +126,7 @@ cookie: CookieConfig
@@ -136,7 +136,7 @@ name: string
@@ -154,7 +154,7 @@ rolling: boolean
@@ -174,7 +174,7 @@ rollingDuration: number | false
@@ -193,14 +193,14 @@ storeIDToken: boolean
diff --git a/docs/interfaces/handlers_callback.callbackoptions.html b/docs/interfaces/handlers_callback.callbackoptions.html
index 020bfdb32..de7267734 100644
--- a/docs/interfaces/handlers_callback.callbackoptions.html
+++ b/docs/interfaces/handlers_callback.callbackoptions.html
@@ -110,7 +110,7 @@
@@ -120,7 +120,7 @@
Optional name
Optional nickname
Optional org_id
Optional picture
Optional sub
Optional updated_at
user
Optional onError
Optional onRedirectingonRedirecting: () => Element
Optional returnTo
response_mode
@@ -122,7 +122,7 @@response_type
@@ -133,7 +133,7 @@scope
auth0Logout
authorizationParams
baseURL
clientID
Optional clientSecret
clientclockTolerance
enableTelemetry
getLoginState
httpTimeout
idTokenSigningAlg
identityClaimFilter
idpLogout
issuerBaseURL
legacySameSiteCookie
routes
secret
session
Optional domain
httpOnly
Optional path
sameSite
Optional secure
transient
identityClaimFilter
Optional organization
routes
absoluteDuration
cookie
name
rolling
rollingDuration
storeIDToken
Boolean value to store the ID token in the session. Storing it can make the session cookie too large. - Defaults to
+ Defaults tofalse
.true
.Optional afterCallbackafterCallback: AfterCallback
Optional authorizationPar
authorizationParams: Partial<AuthorizationParameters>
@@ -136,7 +136,7 @@ organization: string
@@ -152,7 +152,7 @@ redirectUri: string
diff --git a/docs/interfaces/handlers_login.authorizationparams.html b/docs/interfaces/handlers_login.authorizationparams.html
index 424a4473a..eee30c5eb 100644
--- a/docs/interfaces/handlers_login.authorizationparams.html
+++ b/docs/interfaces/handlers_login.authorizationparams.html
@@ -114,7 +114,7 @@ connection: string
@@ -146,7 +146,7 @@
Optional organization
Optional redirectUri
Optional connection
Optional connection_scope
connection_scope: string
@@ -178,7 +178,7 @@ invitation: string
@@ -217,7 +217,7 @@ organization: string
@@ -234,7 +234,7 @@
Optional invitation
Optional organization
Optional response_mode
Inherited from Partial.response_mode
-- Defined in src/auth0-session/config.ts:255
+ - Defined in src/auth0-session/config.ts:255
@@ -245,7 +245,7 @@Optional response_type
screen_hint: string
diff --git a/docs/interfaces/handlers_login.loginoptions.html b/docs/interfaces/handlers_login.loginoptions.html
index c64620be9..96b0cb160 100644
--- a/docs/interfaces/handlers_login.loginoptions.html
+++ b/docs/interfaces/handlers_login.loginoptions.html
@@ -109,7 +109,7 @@
Inherited from Partial.response_type
-- Defined in src/auth0-session/config.ts:256
+ - Defined in src/auth0-session/config.ts:256
@@ -256,7 +256,7 @@Optional scope
@@ -266,7 +266,7 @@Optional screen_hint
Optional authorizationPar
authorizationParams: AuthorizationParams
@@ -124,7 +124,7 @@
Optional getLoginSta
getLoginState: GetLoginState
@@ -139,7 +139,7 @@ returnTo: string
diff --git a/docs/interfaces/handlers_logout.logoutoptions.html b/docs/interfaces/handlers_logout.logoutoptions.html
index 3ece6f77d..7a743eda9 100644
--- a/docs/interfaces/handlers_logout.logoutoptions.html
+++ b/docs/interfaces/handlers_logout.logoutoptions.html
@@ -108,7 +108,7 @@ Params: {}
@@ -131,7 +131,7 @@ returnTo: string
diff --git a/docs/interfaces/index.auth0server.html b/docs/interfaces/index.auth0server.html
index 379953dac..1442bd595 100644
--- a/docs/interfaces/index.auth0server.html
+++ b/docs/interfaces/index.auth0server.html
@@ -113,7 +113,7 @@ getAccessToken: GetAccessToken
@@ -128,7 +128,7 @@ getSession: GetSession
@@ -143,7 +143,7 @@ handleAuth: HandleAuth
@@ -158,7 +158,7 @@ handleCallback: HandleCallback
@@ -173,7 +173,7 @@ handleLogin: HandleLogin
@@ -188,7 +188,7 @@ handleLogout: HandleLogout
@@ -203,7 +203,7 @@ handleProfile: HandleProfile
@@ -218,7 +218,7 @@ updateSession: UpdateSession
@@ -233,7 +233,7 @@ withApiAuthRequired: WithApiAuthRequired
@@ -248,7 +248,7 @@ withPageAuthRequired: WithPageAuthRequired
diff --git a/docs/interfaces/session_get_access_token.accesstokenrequest.html b/docs/interfaces/session_get_access_token.accesstokenrequest.html
index 0ae5b3d5c..e45b2c1b4 100644
--- a/docs/interfaces/session_get_access_token.accesstokenrequest.html
+++ b/docs/interfaces/session_get_access_token.accesstokenrequest.html
@@ -105,7 +105,7 @@ Refresh: AfterRefresh
@@ -146,7 +146,7 @@
Optional returnTo
Optional logoutParams
logoutOptional returnTo
getAccessToken
getSession
handleAuth
handleCallback
handleLogin
handleLogout
handleProfile
updateSession
withApiAuthRequired
withPageAuthRequired
Optional afterRefresh
afterOptional authorizationPar
authorizationParams: Partial<AuthorizationParameters>
@@ -161,7 +161,7 @@ refresh: boolean
@@ -179,7 +179,7 @@ scopes: string[]
diff --git a/docs/interfaces/session_get_access_token.getaccesstokenresult.html b/docs/interfaces/session_get_access_token.getaccesstokenresult.html
index 753289191..25cf9a3d9 100644
--- a/docs/interfaces/session_get_access_token.getaccesstokenresult.html
+++ b/docs/interfaces/session_get_access_token.getaccesstokenresult.html
@@ -102,7 +102,7 @@ accessToken: string
diff --git a/docs/modules/client_use_user.html b/docs/modules/client_use_user.html
index 395aa520e..b5f0909d9 100644
--- a/docs/modules/client_use_user.html
+++ b/docs/modules/client_use_user.html
@@ -110,7 +110,7 @@ UserContext: { checkSession: () => Promise<void>; error?: Error; isLoading: boolean; user?: UserProfile }
@@ -154,7 +154,7 @@ UserProvider: (props: UserProviderProps) => ReactElement<UserContext>
@@ -190,7 +190,7 @@ UserProviderProps: React.PropsWithChildren<{ fetcher?: UserFetcher; profileUrl?: string; user?: UserProfile } & ConfigContext>
@@ -269,7 +269,7 @@
diff --git a/docs/modules/client_with_page_auth_required.html b/docs/modules/client_with_page_auth_required.html
index 5a97bb7ab..01cbdacdc 100644
--- a/docs/modules/client_with_page_auth_required.html
+++ b/docs/modules/client_with_page_auth_required.html
@@ -94,7 +94,7 @@ WithPageAuthRequired: <P>(Component: ComponentType<P & UserProps>, options?: WithPageAuthRequiredOptions) => React.FC<P>
diff --git a/docs/modules/config.html b/docs/modules/config.html
index 148ef3792..0b9a24a17 100644
--- a/docs/modules/config.html
+++ b/docs/modules/config.html
@@ -97,7 +97,7 @@ ConfigParameters: DeepPartial<BaseConfig & NextConfig>
diff --git a/docs/modules/edge.html b/docs/modules/edge.html
index d54691efa..5de7af557 100644
--- a/docs/modules/edge.html
+++ b/docs/modules/edge.html
@@ -108,7 +108,7 @@ Auth0Edge: { getSession: GetSession; withMiddlewareAuthRequired: WithMiddlewareAuthRequired }
@@ -129,7 +129,7 @@ GetSession: (req: NextRequest, res: NextResponse) => Promise<default | null | undefined>
@@ -163,7 +163,7 @@ InitAuth0: (params?: ConfigParameters) => Auth0Edge
@@ -201,7 +201,7 @@
Optional refresh
Optional scopes
Optional accessToken
UserContext
UserProvider
UserProviderProps
Const useUser
WithPageAuthRequired
ConfigParameters
Auth0Edge
GetSession
InitAuth0
Const getSession
Parameters
@@ -227,7 +227,7 @@Const initAuth0
Parameters
@@ -250,7 +250,7 @@Const withMiddlewareAut
HandleAuth: (userHandlers?: Handlers) => NextApiHandler
@@ -137,7 +137,7 @@ Handlers: ApiHandlers | ErrorHandlers
@@ -192,7 +192,7 @@ OnError: (req: NextApiRequest, res: NextApiResponse, error: HandlerError) => Promise<void> | void
diff --git a/docs/modules/handlers_callback.html b/docs/modules/handlers_callback.html
index 5bfcc5b65..b0435f953 100644
--- a/docs/modules/handlers_callback.html
+++ b/docs/modules/handlers_callback.html
@@ -90,10 +90,10 @@
AfterCallback: (req: NextApiRequest, res: NextApiResponse, session: default, state?: {}) => Promise<default> | default | undefined
+ AfterCallback: (req: NextApiRequest, res: NextApiResponse, session: default, state?: {}) => Promise<default | undefined> | default | undefined
@@ -181,7 +181,7 @@ -
-
@@ -205,7 +205,7 @@
@@ -218,7 +218,7 @@ CallbackHandler: (req: NextApiRequest, res: NextApiResponse, options?: CallbackOptions) => Promise<void>
@@ -265,7 +265,7 @@ CallbackOptionsProvider: (req: NextApiRequest) => CallbackOptions
@@ -302,7 +302,7 @@ HandleCallback: { (req: NextApiRequest, res: NextApiResponse<any>, options?: CallbackOptions): Promise<void>; (provider: CallbackOptionsProvider): CallbackHandler; (options: CallbackOptions): CallbackHandler }
diff --git a/docs/modules/handlers_login.html b/docs/modules/handlers_login.html
index 57922e2d6..c15b2524f 100644
--- a/docs/modules/handlers_login.html
+++ b/docs/modules/handlers_login.html
@@ -94,7 +94,7 @@ GetLoginState: (req: NextApiRequest, options: LoginOptions) => {}
@@ -155,7 +155,7 @@ HandleLogin: { (req: NextApiRequest, res: NextApiResponse<any>, options?: LoginOptions): Promise<void>; (provider: LoginOptionsProvider): LoginHandler; (options: LoginOptions): LoginHandler }
@@ -264,7 +264,7 @@ LoginHandler: (req: NextApiRequest, res: NextApiResponse, options?: LoginOptions) => Promise<void>
@@ -311,7 +311,7 @@ LoginOptionsProvider: (req: NextApiRequest) => LoginOptions
diff --git a/docs/modules/handlers_logout.html b/docs/modules/handlers_logout.html
index 5b48bee91..96ebccec2 100644
--- a/docs/modules/handlers_logout.html
+++ b/docs/modules/handlers_logout.html
@@ -92,7 +92,7 @@ HandleLogout: { (req: NextApiRequest, res: NextApiResponse<any>, options?: LogoutOptions): Promise<void>; (provider: LogoutOptionsProvider): LogoutHandler; (options: LogoutOptions): LogoutHandler }
@@ -197,7 +197,7 @@ LogoutHandler: (req: NextApiRequest, res: NextApiResponse, options?: LogoutOptions) => Promise<void>
@@ -244,7 +244,7 @@ LogoutOptionsProvider: (req: NextApiRequest) => LogoutOptions
diff --git a/docs/modules/handlers_profile.html b/docs/modules/handlers_profile.html
index 3cc16b606..c941476b4 100644
--- a/docs/modules/handlers_profile.html
+++ b/docs/modules/handlers_profile.html
@@ -91,7 +91,7 @@ AfterRefetch: (req: NextApiRequest, res: NextApiResponse, session: default) => Promise<default> | default
@@ -131,7 +131,7 @@ HandleProfile: { (req: NextApiRequest, res: NextApiResponse<any>, options?: ProfileOptions): Promise<void>; (provider: ProfileOptionsProvider): ProfileHandler; (options: ProfileOptions): ProfileHandler }
@@ -234,7 +234,7 @@ ProfileHandler: (req: NextApiRequest, res: NextApiResponse, options?: ProfileOptions) => Promise<void>
@@ -281,7 +281,7 @@ ProfileOptions: { afterRefetch?: AfterRefetch; refetch?: boolean }
@@ -325,7 +325,7 @@ ProfileOptionsProvider: (req: NextApiRequest) => ProfileOptions
diff --git a/docs/modules/helpers_testing.html b/docs/modules/helpers_testing.html
index 0bf614142..addcd4151 100644
--- a/docs/modules/helpers_testing.html
+++ b/docs/modules/helpers_testing.html
@@ -90,7 +90,7 @@ GenerateSessionCookieConfig: { duration?: number; secret: string } & Partial<CookieConfig>
@@ -112,7 +112,7 @@
Parameters
diff --git a/docs/modules/handlers_auth.html b/docs/modules/handlers_auth.html index 32bb00e36..edf28dbf1 100644 --- a/docs/modules/handlers_auth.html +++ b/docs/modules/handlers_auth.html @@ -86,7 +86,7 @@HandleAuth
Handlers
OnError
Server Type aliases
AfterCallback
-Type declaration
-- (req: NextApiRequest, res: NextApiResponse, session: default, state?: {}): Promise<default> | default | undefined
+ - (req: NextApiRequest, res: NextApiResponse, session: default, state?: {}): Promise<default | undefined> | default | undefined
[key: Returns Promise<default> | default | undefined +
Returns Promise<default | undefined> | default | undefined
CallbackHandler
CallbackOptionsProvider
HandleCallback
GetLoginState
HandleLogin
LoginHandler
LoginOptionsProvider
HandleLogout
LogoutHandler
LogoutOptionsProvider
AfterRefetch
HandleProfile
ProfileHandler
ProfileOptions
ProfileOptionsProvider
GenerateSessionCookieConfig
Const generateSessionCo
-
WithApiAuthRequired: (apiRoute: NextApiHandler) => NextApiHandler
diff --git a/docs/modules/helpers_with_middleware_auth_required.html b/docs/modules/helpers_with_middleware_auth_required.html
index 01ba71a48..0a42e1c91 100644
--- a/docs/modules/helpers_with_middleware_auth_required.html
+++ b/docs/modules/helpers_with_middleware_auth_required.html
@@ -84,7 +84,7 @@ WithMiddlewareAuthRequired: (middleware?: NextMiddleware) => NextMiddleware
diff --git a/docs/modules/helpers_with_page_auth_required.html b/docs/modules/helpers_with_page_auth_required.html
index 120ab4077..4009e09a4 100644
--- a/docs/modules/helpers_with_page_auth_required.html
+++ b/docs/modules/helpers_with_page_auth_required.html
@@ -87,7 +87,7 @@ GetServerSidePropsResultWithSession<P>: GetServerSidePropsResult<P & { user?: Claims | null }>
@@ -118,7 +118,7 @@ PageRoute<P, Q>: (cts: GetServerSidePropsContext<Q>) => Promise<GetServerSidePropsResultWithSession<P>>
@@ -163,7 +163,7 @@ WithPageAuthRequired: <P, Q>(opts?: WithPageAuthRequiredOptions<P, Q>) => PageRoute<P, Q>
@@ -220,7 +220,7 @@ WithPageAuthRequiredOptions<P, Q>: { getServerSideProps?: GetServerSideProps<P, Q>; returnTo?: string }
diff --git a/docs/modules/index.html b/docs/modules/index.html
index c2dc30ab9..18785fe61 100644
--- a/docs/modules/index.html
+++ b/docs/modules/index.html
@@ -335,7 +335,7 @@ InitAuth0: (params?: ConfigParameters) => Auth0Server
@@ -379,7 +379,7 @@ -
Parameters
diff --git a/docs/modules/helpers_with_api_auth_required.html b/docs/modules/helpers_with_api_auth_required.html index 5e4302362..12ef0dc9a 100644 --- a/docs/modules/helpers_with_api_auth_required.html +++ b/docs/modules/helpers_with_api_auth_required.html @@ -84,7 +84,7 @@WithApiAuthRequired
WithMiddlewareAuthRequired
GetServerSidePropsResultWithSession
PageRoute
WithPageAuthRequired
WithPageAuthRequiredOptions
InitAuth0
Const _initAuth
Parameters
@@ -402,7 +402,7 @@Const getAccessToken
-
-
-
Parameters
@@ -431,7 +431,7 @@Const getSession
Parameters
@@ -457,7 +457,7 @@Const handleAuth
Parameters
@@ -482,7 +482,7 @@Const handleCallback
Parameters
@@ -502,7 +502,7 @@Returns Promise-
Parameters
@@ -516,7 +516,7 @@Returns-
Parameters
@@ -541,7 +541,7 @@Const handleLogin
Parameters
@@ -561,7 +561,7 @@Returns Promise-
Parameters
@@ -575,7 +575,7 @@Returns-
Parameters
@@ -600,7 +600,7 @@Const handleLogout
Parameters
@@ -620,7 +620,7 @@Returns Promise-
Parameters
@@ -634,7 +634,7 @@Returns-
Parameters
@@ -659,7 +659,7 @@Const handleProfile
Parameters
@@ -679,7 +679,7 @@Returns Promise-
Parameters
@@ -693,7 +693,7 @@Returns-
-
Parameters
@@ -716,7 +716,7 @@Const initAuth0
Parameters
@@ -739,7 +739,7 @@Const updateSession
Parameters
@@ -768,7 +768,7 @@Const withApiAuthR
-
Parameters
@@ -791,7 +791,7 @@Const withPageAuth
-
AfterRefresh: (req: NextApiRequest, res: NextApiResponse, session: default) => Promise<default> | default
@@ -135,7 +135,7 @@ GetAccessToken: (req: IncomingMessage | NextApiRequest, res: ServerResponse | NextApiResponse, accessTokenRequest?: AccessTokenRequest) => Promise<GetAccessTokenResult>
diff --git a/docs/modules/session_get_session.html b/docs/modules/session_get_session.html
index 591d583db..ba05e9f5f 100644
--- a/docs/modules/session_get_session.html
+++ b/docs/modules/session_get_session.html
@@ -84,7 +84,7 @@ GetSession: (req: IncomingMessage | NextApiRequest, res: ServerResponse | NextApiResponse) => Promise<default | null | undefined>
diff --git a/docs/modules/session_update_session.html b/docs/modules/session_update_session.html
index 98fa513af..ca8e62fb5 100644
--- a/docs/modules/session_update_session.html
+++ b/docs/modules/session_update_session.html
@@ -84,7 +84,7 @@ UpdateSession: (req: IncomingMessage | NextApiRequest, res: ServerResponse | NextApiResponse, user: default) => Promise<void>
@@ -98,8 +98,8 @@
default: "2.0.0"
+ default: "2.0.1"
diff --git a/package-lock.json b/package-lock.json
index 5d955361b..b30269f46 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@auth0/nextjs-auth0",
- "version": "2.0.0",
+ "version": "2.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@auth0/nextjs-auth0",
- "version": "2.0.0",
+ "version": "2.0.1",
"license": "MIT",
"dependencies": {
"@panva/hkdf": "^1.0.2",
diff --git a/package.json b/package.json
index 78b8db71e..850d193f1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@auth0/nextjs-auth0",
- "version": "2.0.0",
+ "version": "2.0.1",
"description": "Next.js SDK for signing in with Auth0",
"exports": {
".": "./dist/index.js",
diff --git a/src/version.ts b/src/version.ts
index ff603d700..c9e08004a 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export default '2.0.0';
+export default '2.0.1';
Type parameters
diff --git a/docs/modules/session_get_access_token.html b/docs/modules/session_get_access_token.html index 080d42692..74a03ca40 100644 --- a/docs/modules/session_get_access_token.html +++ b/docs/modules/session_get_access_token.html @@ -95,7 +95,7 @@AfterRefresh
GetAccessToken
GetSession
UpdateSession
UpdateSession
export default async function updateSession(req, res) { if (req.method === 'PUT') { - const session = getSession(req, res); - updateSession(req, res, { ...session, user: { ...user, foo: req.query.foo } }); + const session = await getSession(req, res); + updateSession(req, res, { ...session, user: { ...session.user, foo: req.query.foo } }); res.json({ success: true }); } }; diff --git a/docs/modules/version.html b/docs/modules/version.html index fb3bad88a..b8cb7d96b 100644 --- a/docs/modules/version.html +++ b/docs/modules/version.html @@ -81,7 +81,7 @@Properties
default
-