@sparkstudio/authentication-ui 1.0.21 → 1.0.22

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.cjs CHANGED
@@ -44,7 +44,6 @@ var Auth = class {
44
44
  const token = localStorage.getItem("auth_token");
45
45
  const requestOptions = {
46
46
  method: "GET",
47
- credentials: "include",
48
47
  headers: {
49
48
  "Content-Type": "application/json",
50
49
  ...token && { Authorization: `Bearer ${token}` }
@@ -59,7 +58,6 @@ var Auth = class {
59
58
  const token = localStorage.getItem("auth_token");
60
59
  const requestOptions = {
61
60
  method: "GET",
62
- credentials: "include",
63
61
  headers: {
64
62
  "Content-Type": "application/json",
65
63
  ...token && { Authorization: `Bearer ${token}` }
@@ -74,7 +72,6 @@ var Auth = class {
74
72
  const token = localStorage.getItem("auth_token");
75
73
  const requestOptions = {
76
74
  method: "POST",
77
- credentials: "include",
78
75
  headers: {
79
76
  "Content-Type": "application/json",
80
77
  ...token && { Authorization: `Bearer ${token}` }
@@ -85,12 +82,6 @@ var Auth = class {
85
82
  if (!response.ok) throw new Error(await response.text());
86
83
  return await response.json();
87
84
  }
88
- getCookie(name) {
89
- const value = `; ${document.cookie}`;
90
- const parts = value.split(`; ${name}=`);
91
- if (parts.length === 2) return parts.pop().split(";").shift() || null;
92
- return null;
93
- }
94
85
  };
95
86
 
96
87
  // src/api/Controllers/Home.ts
@@ -99,12 +90,6 @@ var Home = class {
99
90
  constructor(baseUrl) {
100
91
  this.baseUrl = baseUrl;
101
92
  }
102
- getCookie(name) {
103
- const value = `; ${document.cookie}`;
104
- const parts = value.split(`; ${name}=`);
105
- if (parts.length === 2) return parts.pop().split(";").shift() || null;
106
- return null;
107
- }
108
93
  };
109
94
 
110
95
  // src/api/SparkStudioAuthenticationSDK.ts
package/dist/index.d.cts CHANGED
@@ -107,7 +107,6 @@ declare class Auth {
107
107
  Logout(): Promise<UserDTO>;
108
108
  GetCurrentUser(): Promise<UserDTO>;
109
109
  SignIn(tokenRequest: TokenRequest): Promise<AuthResponse>;
110
- private getCookie;
111
110
  }
112
111
 
113
112
  /**
@@ -116,7 +115,6 @@ declare class Auth {
116
115
  declare class Home {
117
116
  private baseUrl;
118
117
  constructor(baseUrl: string);
119
- private getCookie;
120
118
  }
121
119
 
122
120
  /**
package/dist/index.d.ts CHANGED
@@ -107,7 +107,6 @@ declare class Auth {
107
107
  Logout(): Promise<UserDTO>;
108
108
  GetCurrentUser(): Promise<UserDTO>;
109
109
  SignIn(tokenRequest: TokenRequest): Promise<AuthResponse>;
110
- private getCookie;
111
110
  }
112
111
 
113
112
  /**
@@ -116,7 +115,6 @@ declare class Auth {
116
115
  declare class Home {
117
116
  private baseUrl;
118
117
  constructor(baseUrl: string);
119
- private getCookie;
120
118
  }
121
119
 
122
120
  /**
package/dist/index.js CHANGED
@@ -17,7 +17,6 @@ var Auth = class {
17
17
  const token = localStorage.getItem("auth_token");
18
18
  const requestOptions = {
19
19
  method: "GET",
20
- credentials: "include",
21
20
  headers: {
22
21
  "Content-Type": "application/json",
23
22
  ...token && { Authorization: `Bearer ${token}` }
@@ -32,7 +31,6 @@ var Auth = class {
32
31
  const token = localStorage.getItem("auth_token");
33
32
  const requestOptions = {
34
33
  method: "GET",
35
- credentials: "include",
36
34
  headers: {
37
35
  "Content-Type": "application/json",
38
36
  ...token && { Authorization: `Bearer ${token}` }
@@ -47,7 +45,6 @@ var Auth = class {
47
45
  const token = localStorage.getItem("auth_token");
48
46
  const requestOptions = {
49
47
  method: "POST",
50
- credentials: "include",
51
48
  headers: {
52
49
  "Content-Type": "application/json",
53
50
  ...token && { Authorization: `Bearer ${token}` }
@@ -58,12 +55,6 @@ var Auth = class {
58
55
  if (!response.ok) throw new Error(await response.text());
59
56
  return await response.json();
60
57
  }
61
- getCookie(name) {
62
- const value = `; ${document.cookie}`;
63
- const parts = value.split(`; ${name}=`);
64
- if (parts.length === 2) return parts.pop().split(";").shift() || null;
65
- return null;
66
- }
67
58
  };
68
59
 
69
60
  // src/api/Controllers/Home.ts
@@ -72,12 +63,6 @@ var Home = class {
72
63
  constructor(baseUrl) {
73
64
  this.baseUrl = baseUrl;
74
65
  }
75
- getCookie(name) {
76
- const value = `; ${document.cookie}`;
77
- const parts = value.split(`; ${name}=`);
78
- if (parts.length === 2) return parts.pop().split(";").shift() || null;
79
- return null;
80
- }
81
66
  };
82
67
 
83
68
  // src/api/SparkStudioAuthenticationSDK.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparkstudio/authentication-ui",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",