I havent run the code but i think this will break:
|
if (err) console.log(err); |
|
req.cookieAuth.set({username: userinfo.username, userid: userinfo.id}); |
|
reply.redirect('/'); |
- The console log will print
- The app will break with "Cannot read username of undefined"
You probably want to reply with either an error view