db authentication replaced by Google

This commit is contained in:
2024-01-08 15:17:18 +01:00
parent 8367606493
commit e29d813aee
11 changed files with 58 additions and 223 deletions

View File

@@ -3,12 +3,11 @@
* @description hooks-up `next-auth` into the page processing pipeline
*/
import NextAuth from 'next-auth';
import { authConfig } from './auth.config.db';
import { auth } from '@/app/lib/auth.google'
export default NextAuth(authConfig).auth;
export default auth; // middleware will call NextAuth's `auth` method, which will in turn call) see `auth.config.google.ts`
export const config = {
// https://nextjs.org/docs/app/building-your-application/routing/middleware#matcher
// midleware will NOT be called for paths: ['/api/auth/*', '/_next/static/*', '/_next/image*']
matcher: ['/((?!api|_next/static|_next/image|.*\\.png$).*)'],
};