Skip to content

Commit

Permalink
fix login (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbjoralt authored Oct 16, 2023
1 parent ffab112 commit 02096fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AuthOptions, getServerSession, Session } from "next-auth";
import NextAuth, { AuthOptions, getServerSession, Session } from "next-auth";
import AzureADProvider from "next-auth/providers/azure-ad";

export type CustomSession = {
Expand Down Expand Up @@ -49,6 +49,10 @@ export const authOptions: AuthOptions = {
},
};

const handler = NextAuth(authOptions);

export async function getCustomServerSession(authOptions: AuthOptions) {
return (await getServerSession(authOptions)) as CustomSession;
}

export { handler as GET, handler as POST };

0 comments on commit 02096fb

Please sign in to comment.