You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone,
I define 2 { successRedirect: '/', failureRedirect: '/login', }. When I press Allow button and then my page redirect failureRedirect's url (/login). Why ?
Want to leave a note here for future users-- Looks like setting the field state = true breaks functionality and therefore will always redirect to failureUrl
Hi everyone,
I define 2 { successRedirect: '/', failureRedirect: '/login', }. When I press Allow button and then my page redirect failureRedirect's url (/login). Why ?
router.get('/auth/linkedin/callback',
passportLinkedIn.authenticate('linkedin', { successRedirect: '/', failureRedirect: '/login' }), (error, req, res, next) => {
console.log()
})
passport.use(new LinkedInStrategy({
clientID: config.linkedin.clientID,
clientSecret: config.linkedin.clientSecret,
callbackURL: config.linkedin.callbackURL,
profileFields: [
"first-name",
"last-name",
"email-address",
"headline",
"summary",
"industry",
"picture-url",
"positions",
"public-profile-url",
"location"
],
scope: ['r_basicprofile', 'r_emailaddress'],
state: true,
passReqToCallback: true
}, function (req, accessToken, refreshToken, profile, done) {
console.log('profile---------------------------------------------------------------------------------------------------')
process.nextTick(function () {
return done(null, profile);
})
}))
The text was updated successfully, but these errors were encountered: