added custom login screen

This commit is contained in:
2024-02-13 16:07:50 +01:00
parent fdd15565b8
commit 199159c208
9 changed files with 96 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ import GoogleProvider from 'next-auth/providers/google';
import { Session } from 'next-auth';
import { AuthenticatedUser } from './types/next-auth';
const authConfig: NextAuthConfig = {
export const authConfig: NextAuthConfig = {
callbacks: {
// method verifies if the user is logged in or not
// -> is called by Next-Auth when the midleware calls the `auth` method (exported below)
@@ -45,6 +45,9 @@ const authConfig: NextAuthConfig = {
// Note: `jwt` is automatically set to `true` if no database is specified.
strategy: 'jwt'
},
pages: {
signIn: '/login',
},
};
export const { auth, handlers: { GET, POST } } = NextAuth(authConfig);