This commit is contained in:
2024-09-14 13:52:31 -04:00
3 changed files with 3333 additions and 0 deletions

13
auth.js Normal file
View File

@@ -0,0 +1,13 @@
import { createClient } from "@propelauth/javascript";
const authClient = createClient({
authUrl: "http://localhost:3000", // Replace with your actual auth URL
enableBackgroundTokenRefresh: true // Optional
});
const authInfo = await authClient.getAuthenticationInfoOrNull();
if (authInfo) {
console.log("User is logged in as", authInfo.user.email);
} else {
console.log("User is not logged in");
}

3319
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -20,6 +20,7 @@
},
"type": "module",
"dependencies": {
"@propelauth/javascript": "^2.0.17",
"@sveltejs/adapter-node": "^5.2.2",
"body-parser": "^1.20.3",
"cookie-parser": "^1.4.6",