1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00

We might not get email data from some users if they didn't allow access to the address. Quick fix for now, should show an error page instead.

This commit is contained in:
Simo Kinnunen 2014-11-18 12:14:38 +09:00
parent 9447d72468
commit 370248d919

View file

@ -31,6 +31,7 @@ module.exports = function(options) {
app.get(
'/auth/oauth/callback'
, function(req, res) {
if (req.user.email) {
res.redirect(urlutil.addParams(options.appUrl, {
jwt: jwtutil.encode({
payload: {
@ -41,6 +42,10 @@ module.exports = function(options) {
})
}))
}
else {
res.redirect('/auth/oauth/')
}
}
)
server.listen(options.port)