mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Get the auth token from cookie in the user_router
This is called through Cloud Task so .authorization is actually Cloud Task's auth token.
This commit is contained in:
parent
8bac8c0fda
commit
3520428ff0
1 changed files with 1 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ export function userRouter() {
|
|||
|
||||
router.post('/email', cors<express.Request>(corsConfig), async (req, res) => {
|
||||
logger.info('email to-user router')
|
||||
const token = req?.headers?.authorization
|
||||
const token = req?.cookies?.auth || req?.headers?.authorization
|
||||
const claims = await getClaimsByToken(token)
|
||||
if (!claims) {
|
||||
res.status(401).send('UNAUTHORIZED')
|
||||
|
|
|
|||
Loading…
Reference in a new issue