authscape 1.0.772 → 1.0.774

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
@@ -838,19 +838,19 @@ function AuthScapeApp(_ref0) {
838
838
  expires: 365,
839
839
  path: "/",
840
840
  domain: domainHost,
841
- secure: true
841
+ secure: typeof window !== "undefined" && window.location.protocol === "https:"
842
842
  });
843
843
  _jsCookie["default"].set("expires_in", String(response.data.expires_in), {
844
844
  expires: 365,
845
845
  path: "/",
846
846
  domain: domainHost,
847
- secure: true
847
+ secure: typeof window !== "undefined" && window.location.protocol === "https:"
848
848
  });
849
849
  _jsCookie["default"].set("refresh_token", response.data.refresh_token, {
850
850
  expires: 365,
851
851
  path: "/",
852
852
  domain: domainHost,
853
- secure: true
853
+ secure: typeof window !== "undefined" && window.location.protocol === "https:"
854
854
  });
855
855
  resetRedirectCounter();
856
856
  redirectUri = window.localStorage.getItem("redirectUri") || "/";
@@ -9748,19 +9748,19 @@ var RefreshToken = /*#__PURE__*/function () {
9748
9748
  expires: 365,
9749
9749
  path: '/',
9750
9750
  domain: domainHost,
9751
- secure: true
9751
+ secure: typeof window !== "undefined" && window.location.protocol === "https:"
9752
9752
  });
9753
9753
  _jsCookie["default"].set('expires_in', String(response.data.expires_in), {
9754
9754
  expires: 365,
9755
9755
  path: '/',
9756
9756
  domain: domainHost,
9757
- secure: true
9757
+ secure: typeof window !== "undefined" && window.location.protocol === "https:"
9758
9758
  });
9759
9759
  _jsCookie["default"].set('refresh_token', response.data.refresh_token, {
9760
9760
  expires: 365,
9761
9761
  path: '/',
9762
9762
  domain: domainHost,
9763
- secure: true
9763
+ secure: typeof window !== "undefined" && window.location.protocol === "https:"
9764
9764
  });
9765
9765
  return _context2.abrupt("return", true);
9766
9766
  case 15:
@@ -9829,17 +9829,17 @@ var apiService = exports.apiService = function apiService() {
9829
9829
  _jsCookie["default"].remove('access_token', {
9830
9830
  path: '/',
9831
9831
  domain: domainHost,
9832
- secure: true
9832
+ secure: typeof window !== "undefined" && window.location.protocol === "https:"
9833
9833
  });
9834
9834
  _jsCookie["default"].remove('refresh_token', {
9835
9835
  path: '/',
9836
9836
  domain: domainHost,
9837
- secure: true
9837
+ secure: typeof window !== "undefined" && window.location.protocol === "https:"
9838
9838
  });
9839
9839
  _jsCookie["default"].remove('expires_in', {
9840
9840
  path: '/',
9841
9841
  domain: domainHost,
9842
- secure: true
9842
+ secure: typeof window !== "undefined" && window.location.protocol === "https:"
9843
9843
  });
9844
9844
  }
9845
9845
  return _context3.abrupt("return", Promise.reject(error));
@@ -10383,17 +10383,17 @@ var _authService = exports.authService = function authService() {
10383
10383
  _jsCookie["default"].remove('access_token', {
10384
10384
  path: '/',
10385
10385
  domain: domainHost,
10386
- secure: true
10386
+ secure: typeof window !== "undefined" && window.location.protocol === "https:"
10387
10387
  });
10388
10388
  _jsCookie["default"].remove('refresh_token', {
10389
10389
  path: '/',
10390
10390
  domain: domainHost,
10391
- secure: true
10391
+ secure: typeof window !== "undefined" && window.location.protocol === "https:"
10392
10392
  });
10393
10393
  _jsCookie["default"].remove('expires_in', {
10394
10394
  path: '/',
10395
10395
  domain: domainHost,
10396
- secure: true
10396
+ secure: typeof window !== "undefined" && window.location.protocol === "https:"
10397
10397
  });
10398
10398
  if (redirectUri == null) {
10399
10399
  window.location.href = AuthUri + "/connect/logout?redirect=" + window.location.href;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.772",
3
+ "version": "1.0.774",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -27,11 +27,13 @@
27
27
  "devDependencies": {
28
28
  "@babel/cli": "^7.27.0",
29
29
  "@babel/core": "^7.26.10",
30
+ "@babel/plugin-transform-runtime": "^7.29.0",
30
31
  "@babel/preset-env": "^7.26.9",
31
32
  "@babel/preset-react": "^7.26.3",
32
33
  "react-dom": "^18.3.1"
33
34
  },
34
35
  "dependencies": {
36
+ "@babel/runtime": "^7.29.2",
35
37
  "@lexical/code": "^0.21.0",
36
38
  "@lexical/html": "^0.21.0",
37
39
  "@lexical/link": "^0.21.0",
@@ -40,7 +42,6 @@
40
42
  "@lexical/rich-text": "^0.21.0",
41
43
  "@lexical/selection": "^0.21.0",
42
44
  "@microsoft/signalr": "^8.0.0",
43
- "lexical": "^0.21.0",
44
45
  "audit": "^0.0.6",
45
46
  "axios": "^1.6.1",
46
47
  "eslint-config-next": "^16.0.3",
@@ -50,6 +51,7 @@
50
51
  "js-cookie": "^3.0.5",
51
52
  "js-file-download": "^0.4.12",
52
53
  "jspdf": "^4.0.0",
54
+ "lexical": "^0.21.0",
53
55
  "query-string": "^7.1.1",
54
56
  "react": "^18.2.0",
55
57
  "react-color": "^2.19.3",
@@ -560,19 +560,19 @@ export function AuthScapeApp({
560
560
  expires: 365,
561
561
  path: "/",
562
562
  domain: domainHost,
563
- secure: true,
563
+ secure: (typeof window !== "undefined" && window.location.protocol === "https:"),
564
564
  });
565
565
  Cookies.set("expires_in", String(response.data.expires_in), {
566
566
  expires: 365,
567
567
  path: "/",
568
568
  domain: domainHost,
569
- secure: true,
569
+ secure: (typeof window !== "undefined" && window.location.protocol === "https:"),
570
570
  });
571
571
  Cookies.set("refresh_token", response.data.refresh_token, {
572
572
  expires: 365,
573
573
  path: "/",
574
574
  domain: domainHost,
575
- secure: true,
575
+ secure: (typeof window !== "undefined" && window.location.protocol === "https:"),
576
576
  });
577
577
 
578
578
  resetRedirectCounter();
@@ -58,21 +58,21 @@ const RefreshToken = async (originalRequest, instance) => {
58
58
  expires: 365,
59
59
  path: '/',
60
60
  domain: domainHost,
61
- secure: true
61
+ secure: (typeof window !== "undefined" && window.location.protocol === "https:")
62
62
  });
63
63
 
64
64
  Cookies.set('expires_in', String(response.data.expires_in), {
65
65
  expires: 365,
66
66
  path: '/',
67
67
  domain: domainHost,
68
- secure: true
68
+ secure: (typeof window !== "undefined" && window.location.protocol === "https:")
69
69
  });
70
70
 
71
71
  Cookies.set('refresh_token', response.data.refresh_token, {
72
72
  expires: 365,
73
73
  path: '/',
74
74
  domain: domainHost,
75
- secure: true
75
+ secure: (typeof window !== "undefined" && window.location.protocol === "https:")
76
76
  });
77
77
 
78
78
  return true;
@@ -116,9 +116,9 @@ export const apiService = (ctx = null) => {
116
116
  if (error.response.status === 400) {
117
117
  if (error.response.config.url.includes("/connect/token")) {
118
118
  let domainHost = window.location.hostname.split('.').slice(-2).join('.');
119
- Cookies.remove('access_token', { path: '/', domain: domainHost, secure: true });
120
- Cookies.remove('refresh_token', { path: '/', domain: domainHost, secure: true });
121
- Cookies.remove('expires_in', { path: '/', domain: domainHost, secure: true });
119
+ Cookies.remove('access_token', { path: '/', domain: domainHost, secure: (typeof window !== "undefined" && window.location.protocol === "https:") });
120
+ Cookies.remove('refresh_token', { path: '/', domain: domainHost, secure: (typeof window !== "undefined" && window.location.protocol === "https:") });
121
+ Cookies.remove('expires_in', { path: '/', domain: domainHost, secure: (typeof window !== "undefined" && window.location.protocol === "https:") });
122
122
  }
123
123
  return Promise.reject(error);
124
124
  }
@@ -116,9 +116,9 @@ export const authService = () => {
116
116
  let domainHost = window.location.hostname.split('.').slice(-2).join('.');
117
117
  let AuthUri = process.env.authorityUri;
118
118
 
119
- Cookies.remove('access_token', { path: '/', domain: domainHost, secure: true });
120
- Cookies.remove('refresh_token', { path: '/', domain: domainHost, secure: true });
121
- Cookies.remove('expires_in', { path: '/', domain: domainHost, secure: true });
119
+ Cookies.remove('access_token', { path: '/', domain: domainHost, secure: (typeof window !== "undefined" && window.location.protocol === "https:") });
120
+ Cookies.remove('refresh_token', { path: '/', domain: domainHost, secure: (typeof window !== "undefined" && window.location.protocol === "https:") });
121
+ Cookies.remove('expires_in', { path: '/', domain: domainHost, secure: (typeof window !== "undefined" && window.location.protocol === "https:") });
122
122
 
123
123
  if (redirectUri == null)
124
124
  {