chore: The session will expire in 24 hours as the refreshToken coming from the API

This commit is contained in:
Pablo Lara
2024-10-04 18:48:51 +02:00
parent 72d875aa4f
commit 8da95c7102
2 changed files with 2 additions and 3 deletions
+2
View File
@@ -54,6 +54,8 @@ const refreshAccessToken = async (token: CustomJwtPayload) => {
export const authConfig = {
session: {
strategy: "jwt",
// The session will be valid for 24 hours
maxAge: 24 * 60 * 60,
},
pages: {
signIn: "/sign-in",
-3
View File
@@ -21,7 +21,6 @@ import { authFormSchema } from "@/types";
import { NotificationIcon, ProwlerExtended } from "../icons";
import { ThemeSwitch } from "../ThemeSwitch";
import { CustomButton, CustomInput } from "../ui/custom";
// import { AuthButton } from "./AuthButton";
export const AuthForm = ({ type }: { type: string }) => {
const formSchema = authFormSchema(type);
@@ -43,8 +42,6 @@ export const AuthForm = ({ type }: { type: string }) => {
const [state, dispatch] = useFormState(authenticate, undefined);
console.log(isLoading, state);
useEffect(() => {
if (state?.message === "Success") {
router.push("/");