mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-28 07:20:49 -04:00
[bug] handle social login missing payload.id
This commit is contained in:
parent
3728c0003e
commit
8f2974740e
@ -348,7 +348,11 @@ router.get('/user/social/:provider', async (req, res) => {
|
|||||||
return res.status(400).redirect('/' + config.user.route);
|
return res.status(400).redirect('/' + config.user.route);
|
||||||
}
|
}
|
||||||
|
|
||||||
const payload = socialLoginHandlers[req.params.provider](req.session.grant.response)
|
const payload = socialLoginHandlers[req.params.provider](req.session.grant.response);
|
||||||
|
|
||||||
|
if (payload.id === undefined) {
|
||||||
|
return res.status(400).redirect('/' + config.user.route);
|
||||||
|
}
|
||||||
|
|
||||||
const auth = await req.db.get(SQL`
|
const auth = await req.db.get(SQL`
|
||||||
SELECT * FROM authenticators
|
SELECT * FROM authenticators
|
||||||
|
Loading…
x
Reference in New Issue
Block a user