@auth0/auth0-react 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth-state.d.ts +14 -14
- package/dist/auth-state.d.ts.map +1 -1
- package/dist/auth0-context.d.ts +134 -135
- package/dist/auth0-context.d.ts.map +1 -1
- package/dist/auth0-provider.d.ts +71 -71
- package/dist/auth0-provider.d.ts.map +1 -1
- package/dist/auth0-react.cjs.js +453 -436
- package/dist/auth0-react.cjs.js.map +1 -1
- package/dist/auth0-react.esm.js +451 -434
- package/dist/auth0-react.esm.js.map +1 -1
- package/dist/auth0-react.js +453 -436
- package/dist/auth0-react.js.map +1 -1
- package/dist/auth0-react.min.js +1 -1
- package/dist/auth0-react.min.js.map +1 -1
- package/dist/errors.d.ts +11 -11
- package/dist/errors.d.ts.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/reducer.d.ts +18 -18
- package/dist/reducer.d.ts.map +1 -1
- package/dist/use-auth0.d.ts +26 -27
- package/dist/use-auth0.d.ts.map +1 -1
- package/dist/utils.d.ts +9 -9
- package/dist/utils.d.ts.map +1 -1
- package/dist/with-auth0.d.ts +28 -28
- package/dist/with-auth0.d.ts.map +1 -1
- package/dist/with-authentication-required.d.ts +76 -76
- package/dist/with-authentication-required.d.ts.map +1 -1
- package/package.json +16 -16
- package/src/auth-state.tsx +4 -2
- package/src/auth0-context.tsx +2 -2
- package/src/auth0-provider.tsx +10 -10
- package/src/errors.tsx +1 -1
- package/src/reducer.tsx +4 -4
- package/src/utils.tsx +1 -1
- package/src/with-authentication-required.tsx +2 -2
package/src/utils.tsx
CHANGED
|
@@ -47,7 +47,7 @@ export const deprecateRedirectUri = (options?: any) => {
|
|
|
47
47
|
console.warn(
|
|
48
48
|
'Using `redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version'
|
|
49
49
|
);
|
|
50
|
-
options.authorizationParams = options.authorizationParams
|
|
50
|
+
options.authorizationParams = options.authorizationParams ?? {};
|
|
51
51
|
options.authorizationParams.redirect_uri = options.redirectUri;
|
|
52
52
|
delete options.redirectUri;
|
|
53
53
|
}
|
|
@@ -117,11 +117,11 @@ const withAuthenticationRequired = <P extends object>(
|
|
|
117
117
|
const opts = {
|
|
118
118
|
...loginOptions,
|
|
119
119
|
appState: {
|
|
120
|
-
...
|
|
120
|
+
...loginOptions?.appState,
|
|
121
121
|
returnTo: typeof returnTo === 'function' ? returnTo() : returnTo,
|
|
122
122
|
},
|
|
123
123
|
};
|
|
124
|
-
(async (): Promise<void> => {
|
|
124
|
+
void (async (): Promise<void> => {
|
|
125
125
|
await onBeforeAuthentication();
|
|
126
126
|
await loginWithRedirect(opts);
|
|
127
127
|
})();
|