This PR introduces a basic authentication pipeline for a Next.js application using NextAuth. The following components and functionality are included:
Middleware Setup:
• Middleware to handle routing based on authentication status, ensuring only authorized users can access protected pages.
Home and Auth Pages:
• Home page, accessible only to authenticated users.
• Auth page, accessible to users who need to log in.
Root Redirection Logic:
• A function in app/page.tsx to redirect users based on authentication status.
• If the user is authenticated, they are redirected to the Home page; if not, they are sent to the Auth page.
This setup provides a foundational authentication flow, leveraging NextAuth for user session management and redirection based on user authentication.
PR Description
This PR introduces a basic authentication pipeline for a Next.js application using NextAuth. The following components and functionality are included:
This setup provides a foundational authentication flow, leveraging NextAuth for user session management and redirection based on user authentication.