Added Logout Option and prefetch for the dashboard
This commit is contained in:
@@ -32,17 +32,6 @@ export async function middleware(req, next) {
|
||||
});
|
||||
}
|
||||
|
||||
// Add authentication logic here (verify the token, etc.)
|
||||
// const isAuthenticated = verifyToken(token);
|
||||
// const isAuthenticated = hasCookie("cmc-token", { req });
|
||||
|
||||
// if (!isAuthenticated) {
|
||||
// // Handle unauthenticated users
|
||||
// return NextResponse.error(new Error("Authentication failed"), {
|
||||
// status: 401,
|
||||
// });
|
||||
// }
|
||||
|
||||
} catch (error) {
|
||||
console.error("Error during authentication check:", error);
|
||||
return NextResponse.error();
|
||||
@@ -54,12 +43,7 @@ export const config = {
|
||||
};
|
||||
|
||||
const authenticationPages = [
|
||||
// "/",
|
||||
"/auth",
|
||||
"/auth/login",
|
||||
"/auth/sign-up",
|
||||
"/auth/forgot-password",
|
||||
"/auth/lock-screen",
|
||||
"/auth/confirm-mail",
|
||||
"/auth/logout",
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user