use successRedirect

- the other documented way doesn't redirect.
This commit is contained in:
Paul Rodwell 2023-02-07 11:56:39 +00:00
parent 40afd20e4f
commit 32ef602460
No known key found for this signature in database
GPG Key ID: 083BA337597C49E6
1 changed files with 1 additions and 4 deletions

View File

@ -357,10 +357,7 @@ module.exports = exports = (log, loga, argv) ->
# Twitter
app.get('/auth/twitter', passport.authenticate(twitterStrategyName), (req, res) -> )
app.get('/auth/twitter/callback',
passport.authenticate(twitterStrategyName, { failureRedirect: '/auth/loginDialog'}),
(req, res) ->
res.redirect('/auth/loginDone')
)
passport.authenticate(twitterStrategyName, { successRedirect: '/auth/loginDone', failureRedirect: '/auth/loginDialog'}))
# Google
app.get('/auth/google', passport.authenticate(googleStrategyName, { scope: [