@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 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 ?? window.location.origin;
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 ?? window.location.origin;
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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@famgia/omnify-client-sso-react",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "React components and hooks for Omnify SSO integration",
5
5
  "keywords": [
6
6
  "react",