authscape 1.0.420 → 1.0.422

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/index.js CHANGED
@@ -26,6 +26,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
26
26
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
27
27
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
28
28
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
29
+ // import { authService, apiService, setupOEMProps, OEMStyleSheet } from 'authscape';
30
+
29
31
  function AuthScapeApp(_ref) {
30
32
  var Component = _ref.Component,
31
33
  layout = _ref.layout,
@@ -156,12 +158,13 @@ function AuthScapeApp(_ref) {
156
158
  case 6:
157
159
  setFrontEndLoadedState(true);
158
160
  frontEndLoaded.current = true;
159
-
160
- // if (enforceLoggedIn)
161
- // {
162
- // await authService().login();
163
- // }
164
- case 8:
161
+ if (!(signedInUser.current == null && enforceLoggedIn && pathname != "/signin-oidc")) {
162
+ _context2.next = 11;
163
+ break;
164
+ }
165
+ _context2.next = 11;
166
+ return authService().login();
167
+ case 11:
165
168
  case "end":
166
169
  return _context2.stop();
167
170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.420",
3
+ "version": "1.0.422",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -6,6 +6,7 @@ import { useSearchParams, usePathname } from 'next/navigation';
6
6
  import axios from 'axios';
7
7
  import querystring from "query-string";
8
8
  import { setCookie } from 'nookies'
9
+ // import { authService, apiService, setupOEMProps, OEMStyleSheet } from 'authscape';
9
10
 
10
11
  export function AuthScapeApp ({Component, layout, pageProps, muiTheme = {}, enforceLoggedIn = false, enableAuth = true}) {
11
12
 
@@ -116,10 +117,10 @@ export function AuthScapeApp ({Component, layout, pageProps, muiTheme = {}, enfo
116
117
  setFrontEndLoadedState(true);
117
118
  frontEndLoaded.current = true;
118
119
 
119
- // if (enforceLoggedIn)
120
- // {
121
- // await authService().login();
122
- // }
120
+ if (signedInUser.current == null && enforceLoggedIn && pathname != "/signin-oidc")
121
+ {
122
+ await authService().login();
123
+ }
123
124
  }
124
125
 
125
126
  if (queryCode != null)