Open NitinKhareH opened 4 years ago
It might be because of state url parameter encoding. Having the issue that in 10% of the cases the authentication fails because randomly generated state contains special characters that cause problems with AWS Cognito...
We only redirect from the page when we have no user in the session
` router.get('/auth/openidconnect',oidcSettings, oidcProviderReq); router.get('/auth/openidconnect/callback',oidcSettings, oidcCallback);
let oidcSettings = function (req, res, next) {
}
let oidcProviderReq = function(req, res, next){ passport.authenticate('oidc', {scope: 'openid profile'})(req, res, next); }
let oidcCallback = function(req, res, next){ passport.authenticate('oidc', function (err, user, info) { if(err) throw err; console.log(user) })(req, res, next); }
`