authscape 1.0.772 → 1.0.773

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.772",
3
+ "version": "1.0.773",
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
  {