rewrote auth.js
This commit is contained in:
1 parent
c9ce4c1083
commit
edc6a5b0d3
2 files changed
+13
No files matched your search
@@ -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");
|
||||||
|
}
|
||||||
Whitespace-only changes.
Reference in new issue
Block a user