@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 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
- try {
215
- const headers = {};
216
- if (jwt) headers["Authorization"] = `Bearer ${jwt}`;
217
- await fetch(`${apiOrigin}/api/v1/session`, {
218
- method: "DELETE",
219
- credentials: jwt ? "omit" : "include",
220
- headers
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
- try {
183
- const headers = {};
184
- if (jwt) headers["Authorization"] = `Bearer ${jwt}`;
185
- await fetch(`${apiOrigin}/api/v1/session`, {
186
- method: "DELETE",
187
- credentials: jwt ? "omit" : "include",
188
- headers
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 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaultix.ai/react",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Vaultix-ID React SDK — drop-in auth components for any React app",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",