Next Auth Google provider

This commit is contained in:
Brad Traversy
2024-07-10 08:20:58 -04:00
parent 0b1c9aaa02
commit a255f02cd2
6 changed files with 223 additions and 6 deletions
+6
View File
@@ -0,0 +1,6 @@
import { authOptions } from '@/utils/authOptions';
import NextAuth from 'next-auth/next';
const handler = NextAuth(authOptions);
export { handler as GET, handler as POST };
+9 -6
View File
@@ -1,4 +1,5 @@
import Navbar from '@/components/Navbar';
import AuthProvider from '@/components/AuthProvider';
import '@/assets/styles/globals.css';
export const metadata = {
@@ -9,12 +10,14 @@ export const metadata = {
const MainLayout = ({ children }) => {
return (
<html lang='en'>
<body>
<Navbar />
<main>{children}</main>
</body>
</html>
<AuthProvider>
<html lang='en'>
<body>
<Navbar />
<main>{children}</main>
</body>
</html>
</AuthProvider>
);
};