Merge branch 'main' of https://github.com/GamerBoss101/VTHacks-12
This commit is contained in:
13
auth.js
Normal file
13
auth.js
Normal 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
3319
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user