@vaultix.ai/react 0.3.0 → 0.3.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.js +8 -10
- package/dist/index.mjs +8 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -211,16 +211,14 @@ function VaultixProvider({
|
|
|
211
211
|
const jwt = jwtRef.current;
|
|
212
212
|
clearAuth();
|
|
213
213
|
if (refreshTimerRef.current) clearTimeout(refreshTimerRef.current);
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
} catch {
|
|
223
|
-
}
|
|
214
|
+
const headers = {};
|
|
215
|
+
if (jwt) headers["Authorization"] = `Bearer ${jwt}`;
|
|
216
|
+
fetch(`${apiOrigin}/api/v1/session`, {
|
|
217
|
+
method: "DELETE",
|
|
218
|
+
credentials: jwt ? "omit" : "include",
|
|
219
|
+
headers
|
|
220
|
+
}).catch(() => {
|
|
221
|
+
});
|
|
224
222
|
if (afterSignInUrl) window.location.href = afterSignInUrl;
|
|
225
223
|
}, [apiOrigin, afterSignInUrl, clearAuth]);
|
|
226
224
|
const value = {
|
package/dist/index.mjs
CHANGED
|
@@ -179,16 +179,14 @@ function VaultixProvider({
|
|
|
179
179
|
const jwt = jwtRef.current;
|
|
180
180
|
clearAuth();
|
|
181
181
|
if (refreshTimerRef.current) clearTimeout(refreshTimerRef.current);
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
} catch {
|
|
191
|
-
}
|
|
182
|
+
const headers = {};
|
|
183
|
+
if (jwt) headers["Authorization"] = `Bearer ${jwt}`;
|
|
184
|
+
fetch(`${apiOrigin}/api/v1/session`, {
|
|
185
|
+
method: "DELETE",
|
|
186
|
+
credentials: jwt ? "omit" : "include",
|
|
187
|
+
headers
|
|
188
|
+
}).catch(() => {
|
|
189
|
+
});
|
|
192
190
|
if (afterSignInUrl) window.location.href = afterSignInUrl;
|
|
193
191
|
}, [apiOrigin, afterSignInUrl, clearAuth]);
|
|
194
192
|
const value = {
|