diff --git a/auth.js b/auth.js index e69de29..5039ebc 100644 --- a/auth.js +++ b/auth.js @@ -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"); +} diff --git a/authuser.js b/authuser.js deleted file mode 100644 index e69de29..0000000