@cimpress/simple-auth-wrapper
Advanced tools
Comparing version
# Changelog | ||
## 8.3.0 (2023-02-08) | ||
* nextUri option in logout() is updated to support both relative paths and absolute paths. | ||
## 8.2.2 (2022-06-06) | ||
@@ -4,0 +7,0 @@ * buffer package added to package.json to fix polyfill issue in webpack 5.0/ react-scripts 5.0.0. |
@@ -572,3 +572,4 @@ 'use strict'; | ||
// also log out with auth0 | ||
var returnTo = nextUri ? { returnTo: window.location.origin + nextUri } : {}; | ||
var isAbsolute = new RegExp('^(?:[a-z+]+:)?//', 'i'); | ||
var returnTo = nextUri ? { returnTo: isAbsolute.test(nextUri) ? nextUri : window.location.origin + nextUri } : {}; | ||
if (logoutOfFederated) { | ||
@@ -575,0 +576,0 @@ _this.auth0.logout(_extends({ |
@@ -554,3 +554,4 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
// also log out with auth0 | ||
var returnTo = nextUri ? { returnTo: window.location.origin + nextUri } : {}; | ||
var isAbsolute = new RegExp('^(?:[a-z+]+:)?//', 'i'); | ||
var returnTo = nextUri ? { returnTo: isAbsolute.test(nextUri) ? nextUri : window.location.origin + nextUri } : {}; | ||
if (logoutOfFederated) { | ||
@@ -557,0 +558,0 @@ _this.auth0.logout(_extends({ |
{ | ||
"name": "@cimpress/simple-auth-wrapper", | ||
"version": "8.2.5", | ||
"version": "8.3.0", | ||
"description": "A simple utility class to wrap basic Auth0 functionality", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -190,3 +190,3 @@ # MEX Simple Auth Wrapper v. 3.0 | ||
`logout(nextUri)` closes the active session and clears the local storage. After logging the user out, the user is sent to the url specified in 'nextUri'. | ||
`logout(nextUri)` closes the active session and clears the local storage. After logging the user out, the user is sent to the url specified in 'nextUri'. If nextUri is a relative path then the user will be sent to `window.location.origin + nextUri` | ||
@@ -211,2 +211,2 @@ `isLoggedIn(sessionId)` returns whether the current session is Active. | ||
}); | ||
``` | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
279764
0.31%2602
0.08%211
0.48%