werkt het dan nu?
This commit is contained in:
@@ -10,8 +10,8 @@ const userConfig: AuthProviderProps = {
|
|||||||
client_secret: process.env.NEXT_PUBLIC_CLIENT_SECRET!,
|
client_secret: process.env.NEXT_PUBLIC_CLIENT_SECRET!,
|
||||||
redirect_uri: REDIRECT_URI,
|
redirect_uri: REDIRECT_URI,
|
||||||
response_type: "code",
|
response_type: "code",
|
||||||
includeIdTokenInSilentRenew: true,
|
//includeIdTokenInSilentRenew: true,
|
||||||
automaticSilentRenew: false, // We skippen automatic silent en doen het zelf hieronder.
|
automaticSilentRenew: true,
|
||||||
scope: "openid profile email offline_access", //TODO: Iets met scopes.
|
scope: "openid profile email offline_access", //TODO: Iets met scopes.
|
||||||
//accessTokenExpiringNotificationTimeInSeconds: 1 * 60,
|
//accessTokenExpiringNotificationTimeInSeconds: 1 * 60,
|
||||||
loadUserInfo: true,
|
loadUserInfo: true,
|
||||||
@@ -25,13 +25,13 @@ export const userManager = new UserManager(userConfig);
|
|||||||
// Some handling of token expiration.
|
// Some handling of token expiration.
|
||||||
// Hopefully this means login timeout issues are prevented somewhat.
|
// Hopefully this means login timeout issues are prevented somewhat.
|
||||||
userManager.events.addAccessTokenExpiring(() => {
|
userManager.events.addAccessTokenExpiring(() => {
|
||||||
console.warn("Access token expiring, silently renewing...");
|
console.log("Access token expiring");
|
||||||
userManager.signinSilent(); //TODO: uitzoeken bij welke callback dit trecht komt
|
//userManager.signinRedirect(); //TODO: uitzoeken bij welke callback dit trecht komt
|
||||||
});
|
});
|
||||||
|
|
||||||
userManager.events.addAccessTokenExpired(() => {
|
userManager.events.addAccessTokenExpired(() => {
|
||||||
console.warn("Access token expired, redirecting to login...");
|
console.log("Access token expired");
|
||||||
userManager.signinRedirect();
|
//userManager.signinRedirect();
|
||||||
});
|
});
|
||||||
|
|
||||||
export const oidcConfig = { ...userConfig, userManager };
|
export const oidcConfig = { ...userConfig, userManager };
|
||||||
|
|||||||
Reference in New Issue
Block a user