mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #58 from omnivore-app/fix/upgrade-axios
Handle upgraded axios API for headers
This commit is contained in:
commit
5724364be0
1 changed files with 18 additions and 0 deletions
|
|
@ -275,6 +275,15 @@ export function authRouter() {
|
|||
)
|
||||
}
|
||||
|
||||
if (!result.headers['set-cookie']) {
|
||||
return res.redirect(
|
||||
`${env.client.url}/${
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(req.params as any)?.action
|
||||
}?errorCodes=unknown`
|
||||
)
|
||||
}
|
||||
|
||||
res.setHeader('set-cookie', result.headers['set-cookie'])
|
||||
|
||||
handleSuccessfulLogin(req, res, user, data.googleLogin.newUser)
|
||||
|
|
@ -384,6 +393,15 @@ export function authRouter() {
|
|||
)
|
||||
}
|
||||
|
||||
if (!result.headers['set-cookie']) {
|
||||
return res.redirect(
|
||||
`${env.client.url}/${
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(req.params as any)?.action
|
||||
}?errorCodes=unknown`
|
||||
)
|
||||
}
|
||||
|
||||
res.setHeader('set-cookie', result.headers['set-cookie'])
|
||||
|
||||
await handleSuccessfulLogin(req, res, data.login.me, false)
|
||||
|
|
|
|||
Loading…
Reference in a new issue