@auth0/auth0-spa-js 2.0.2 → 2.0.3
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/auth0-spa-js.development.js +9 -2
- package/dist/auth0-spa-js.development.js.map +1 -1
- package/dist/auth0-spa-js.production.esm.js +1 -1
- package/dist/auth0-spa-js.production.esm.js.map +1 -1
- package/dist/auth0-spa-js.production.js +1 -1
- package/dist/auth0-spa-js.production.js.map +1 -1
- package/dist/lib/auth0-spa-js.cjs.js +9 -2
- package/dist/lib/auth0-spa-js.cjs.js.map +1 -1
- package/dist/typings/global.d.ts +1 -1
- package/dist/typings/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/Auth0Client.ts +5 -1
- package/src/global.ts +1 -1
- package/src/storage.ts +4 -0
- package/src/version.ts +1 -1
package/dist/typings/global.d.ts
CHANGED
|
@@ -365,7 +365,7 @@ export interface LogoutUrlOptions {
|
|
|
365
365
|
*
|
|
366
366
|
* [Read more about how redirecting after logout works](https://auth0.com/docs/logout/guides/redirect-users-after-logout)
|
|
367
367
|
*/
|
|
368
|
-
clientId?: string;
|
|
368
|
+
clientId?: string | null;
|
|
369
369
|
/**
|
|
370
370
|
* Parameters to pass to the logout endpoint. This can be known parameters defined by Auth0 or custom parameters
|
|
371
371
|
* you wish to provide.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "2.0.
|
|
1
|
+
declare const _default: "2.0.3";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "@auth0/auth0-spa-js",
|
|
4
4
|
"description": "Auth0 SDK for Single Page Applications using Authorization Code Grant Flow with PKCE",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "2.0.
|
|
6
|
+
"version": "2.0.3",
|
|
7
7
|
"main": "dist/lib/auth0-spa-js.cjs.js",
|
|
8
8
|
"types": "dist/typings/index.d.ts",
|
|
9
9
|
"module": "dist/auth0-spa-js.production.esm.js",
|
package/src/Auth0Client.ts
CHANGED
|
@@ -828,7 +828,11 @@ export class Auth0Client {
|
|
|
828
828
|
public async logout(options: LogoutOptions = {}): Promise<void> {
|
|
829
829
|
const { openUrl, ...logoutOptions } = patchOpenUrlWithOnRedirect(options);
|
|
830
830
|
|
|
831
|
-
|
|
831
|
+
if (options.clientId === null) {
|
|
832
|
+
await this.cacheManager.clear();
|
|
833
|
+
} else {
|
|
834
|
+
await this.cacheManager.clear(options.clientId || this.options.clientId);
|
|
835
|
+
}
|
|
832
836
|
|
|
833
837
|
this.cookieStorage.remove(this.orgHintCookieName, {
|
|
834
838
|
cookieDomain: this.options.cookieDomain
|
package/src/global.ts
CHANGED
|
@@ -410,7 +410,7 @@ export interface LogoutUrlOptions {
|
|
|
410
410
|
*
|
|
411
411
|
* [Read more about how redirecting after logout works](https://auth0.com/docs/logout/guides/redirect-users-after-logout)
|
|
412
412
|
*/
|
|
413
|
-
clientId?: string;
|
|
413
|
+
clientId?: string | null;
|
|
414
414
|
|
|
415
415
|
/**
|
|
416
416
|
* Parameters to pass to the logout endpoint. This can be known parameters defined by Auth0 or custom parameters
|
package/src/storage.ts
CHANGED
|
@@ -91,6 +91,10 @@ export const CookieStorageWithLegacySameSite = {
|
|
|
91
91
|
cookieAttributes.expires = options.daysUntilExpire;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
if (options?.cookieDomain) {
|
|
95
|
+
cookieAttributes.domain = options.cookieDomain;
|
|
96
|
+
}
|
|
97
|
+
|
|
94
98
|
Cookies.set(
|
|
95
99
|
`${LEGACY_PREFIX}${key}`,
|
|
96
100
|
JSON.stringify(value),
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '2.0.
|
|
1
|
+
export default '2.0.3';
|