@peable/services
Advanced tools
Comparing version 0.0.50 to 0.0.51
@@ -22,8 +22,15 @@ import { useState, useEffect } from "react"; | ||
// Session retrieval (as before) | ||
const sessionResponse = await axios.get(config.SERVICES_URL + "/api/auth/session", { | ||
withCredentials: true, | ||
const sessionResponse = await fetch(config.SERVICES_URL + "/api/auth/session", { | ||
credentials: "include", | ||
}); | ||
if (sessionResponse?.data) { | ||
setSession(sessionResponse.data); | ||
setStatus("authenticated"); | ||
if (sessionResponse.ok) { | ||
const sessionData = await sessionResponse.json(); | ||
if (sessionData) { | ||
setSession(sessionData); | ||
setStatus("authenticated"); | ||
} | ||
else { | ||
setSession(null); | ||
setStatus("unauthenticated"); | ||
} | ||
} | ||
@@ -30,0 +37,0 @@ else { |
{ | ||
"name": "@peable/services", | ||
"version": "0.0.50", | ||
"version": "0.0.51", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5992
110
1