@opengeoweb/authentication 20.0.0 → 20.0.1

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.esm.js CHANGED
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import axios from 'axios';
3
3
  import React, { useRef, useEffect, useState } from 'react';
4
4
  import { Navigate, Link } from 'react-router';
5
- import { sessionStorageProvider, useIsMounted, SHARED_NAMESPACE, AlertBanner, useDebounce } from '@opengeoweb/shared';
5
+ import { sessionStorageProvider, useIsMounted, browserNavigation, SHARED_NAMESPACE, AlertBanner, useDebounce } from '@opengeoweb/shared';
6
6
  import { useTranslation, Trans } from 'react-i18next';
7
7
  import { ThemeWrapper } from '@opengeoweb/theme';
8
8
  import 'i18next';
@@ -1112,7 +1112,7 @@ var OAuth2Login = function OAuth2Login() {
1112
1112
  React.useEffect(function () {
1113
1113
  var callbackUrl = getCurrentUrlLocation(sessionStorageProvider.getCallbackUrl(), authConfig.GW_APP_URL);
1114
1114
  sessionStorageProvider.setCallbackUrl(callbackUrl);
1115
- window.location.assign(authConfig.GW_AUTH_LOGIN_URL);
1115
+ browserNavigation.assign(authConfig.GW_AUTH_LOGIN_URL);
1116
1116
  // Runs once and navigates away immediately; doesn't need to re-fire if
1117
1117
  // authConfig happens to change before that navigation completes.
1118
1118
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -1169,7 +1169,7 @@ var OAuth2Logout = function OAuth2Logout(_ref) {
1169
1169
  suppressSilentLogin();
1170
1170
  broadcastLogout();
1171
1171
  }
1172
- window.location.assign(authConfig.GW_AUTH_LOGOUT_URL);
1172
+ browserNavigation.assign(authConfig.GW_AUTH_LOGOUT_URL);
1173
1173
  }
1174
1174
  }, [isLoggedIn, onSetAuth, onLogin, sessionStorageProvider, authConfig.GW_AUTH_LOGOUT_URL, silentLoginEnabled]);
1175
1175
  return showAlert ? jsx(ThemeWrapper, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/authentication",
3
- "version": "20.0.0",
3
+ "version": "20.0.1",
4
4
  "description": "GeoWeb authentication library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -21,8 +21,8 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "axios": "^1.18.0",
24
- "@opengeoweb/shared": "20.0.0",
25
- "@opengeoweb/theme": "20.0.0",
24
+ "@opengeoweb/shared": "20.0.1",
25
+ "@opengeoweb/theme": "20.0.1",
26
26
  "i18next": "^25.0.1",
27
27
  "react-i18next": "^15.1.1",
28
28
  "@mui/material": "^9.0.1",