Neah version calendar fix 3 debuger sec chance danger debug 9

This commit is contained in:
alma 2025-04-17 00:53:09 +02:00
parent ae15fa7678
commit 0c24fd0c95
2 changed files with 4 additions and 1 deletions

View File

@ -61,6 +61,9 @@ export const authOptions: NextAuthOptions = {
callbacks: {
async jwt({ token, account, profile }) {
if (account && profile) {
if (!account.access_token || !account.refresh_token) {
throw new Error('Missing required token fields from Keycloak');
}
token.accessToken = account.access_token;
token.refreshToken = account.refresh_token;
token.accessTokenExpires = account.expires_at! * 1000;

View File

@ -3,7 +3,7 @@ import { Inter } from "next/font/google";
import "./globals.css";
import { headers } from "next/headers";
import { getServerSession } from "next-auth/next";
import { authOptions } from "@/lib/auth";
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
import { Providers } from "@/components/providers";
import { LayoutWrapper } from "@/components/layout/layout-wrapper";
import { Toaster } from "@/components/ui/toaster";