Token table caching issue resolved #5
@ -84,13 +84,13 @@ export default function AuthPage() {
|
|||||||
loginData.email,
|
loginData.email,
|
||||||
loginData.password
|
loginData.password
|
||||||
);
|
);
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
const user = await account.get();
|
const user = await account.get();
|
||||||
if (user) {
|
if (user) {
|
||||||
localStorage.setItem("isLoggedIn", "true");
|
localStorage.setItem("isLoggedIn", "true");
|
||||||
setIsAuthenticated(true);
|
setIsAuthenticated(true);
|
||||||
router.push("/dashboard");
|
window.location.href = '/dashboard';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -167,8 +167,8 @@ export default function AuthPage() {
|
|||||||
{isLoginForm ? "Sign In" : "Sign Up"}
|
{isLoginForm ? "Sign In" : "Sign Up"}
|
||||||
</h1>
|
</h1>
|
||||||
<p className="text-sm text-gray-500 dark:text-gray-400">
|
<p className="text-sm text-gray-500 dark:text-gray-400">
|
||||||
{isLoginForm
|
{isLoginForm
|
||||||
? "Enter your email and password to sign In!"
|
? "Enter your email and password to sign In!"
|
||||||
: "Enter your deatils to create an account!"}
|
: "Enter your deatils to create an account!"}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user