@famgia/omnify-client-sso-react 1.1.1 → 1.1.2
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/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -197,7 +197,7 @@ function SsoProvider({ children, config, onAuthChange }) {
|
|
|
197
197
|
const globalLogout = (0, import_react2.useCallback)(
|
|
198
198
|
async (redirectTo) => {
|
|
199
199
|
await logout();
|
|
200
|
-
const redirectUri = redirectTo
|
|
200
|
+
const redirectUri = redirectTo ? new URL(redirectTo, window.location.origin).toString() : window.location.origin;
|
|
201
201
|
const logoutUrl = new URL("/sso/logout", config.consoleUrl);
|
|
202
202
|
logoutUrl.searchParams.set("redirect_uri", redirectUri);
|
|
203
203
|
window.location.href = logoutUrl.toString();
|
package/dist/index.mjs
CHANGED
|
@@ -152,7 +152,7 @@ function SsoProvider({ children, config, onAuthChange }) {
|
|
|
152
152
|
const globalLogout = useCallback(
|
|
153
153
|
async (redirectTo) => {
|
|
154
154
|
await logout();
|
|
155
|
-
const redirectUri = redirectTo
|
|
155
|
+
const redirectUri = redirectTo ? new URL(redirectTo, window.location.origin).toString() : window.location.origin;
|
|
156
156
|
const logoutUrl = new URL("/sso/logout", config.consoleUrl);
|
|
157
157
|
logoutUrl.searchParams.set("redirect_uri", redirectUri);
|
|
158
158
|
window.location.href = logoutUrl.toString();
|