I've been immersed in a project that involves integrating OIDC authentication into a react SPA using authorization code with PKCE. I'm utilizing the oidc-client-js library for this purpose. The issue I'm facing is that, post-authentication, I keep getting redirected back to the login pattern. Even though my code seems to be correct, there might be an asynchronous problem causing this loop. Any assistance you can offer would be greatly appreciated. Can you please help me out?
Thank you in advance.
My Configuration:
const userManager = new UserManager({
authority: identityProvider,
client_id: window.REACT_APP_CLIENT_ID,
response_type: 'code',
redirect_uri: 'http://localhost:3000/auth-callback',
scope: 'openid',
loadUserInfo: false,
revokeAccessTokenOnSignout: true,
filterProtocolClaims: true,
monitorSession: true,
metadata: {
issuer: identityProvider,
jwks_uri: `${identityProvider}/pf/JWKS`,
// more configurations follow...
}
)
And so on...