diff --git a/frontend/src/config/auth.ts b/frontend/src/config/auth.ts index ffddcfa..40dc841 100644 --- a/frontend/src/config/auth.ts +++ b/frontend/src/config/auth.ts @@ -10,8 +10,8 @@ const userConfig: AuthProviderProps = { client_secret: process.env.NEXT_PUBLIC_CLIENT_SECRET!, redirect_uri: REDIRECT_URI, response_type: "code", - includeIdTokenInSilentRenew: true, - automaticSilentRenew: false, // We skippen automatic silent en doen het zelf hieronder. + //includeIdTokenInSilentRenew: true, + automaticSilentRenew: true, scope: "openid profile email offline_access", //TODO: Iets met scopes. //accessTokenExpiringNotificationTimeInSeconds: 1 * 60, loadUserInfo: true, @@ -25,13 +25,13 @@ export const userManager = new UserManager(userConfig); // Some handling of token expiration. // Hopefully this means login timeout issues are prevented somewhat. userManager.events.addAccessTokenExpiring(() => { - console.warn("Access token expiring, silently renewing..."); - userManager.signinSilent(); //TODO: uitzoeken bij welke callback dit trecht komt + console.log("Access token expiring"); + //userManager.signinRedirect(); //TODO: uitzoeken bij welke callback dit trecht komt }); userManager.events.addAccessTokenExpired(() => { - console.warn("Access token expired, redirecting to login..."); - userManager.signinRedirect(); + console.log("Access token expired"); + //userManager.signinRedirect(); }); export const oidcConfig = { ...userConfig, userManager };