Merge pull request #1621 from omnivore-app/fix/get-auth-token-from-cookie
Get the auth token from cookie in the user_router
This commit is contained in:
@ -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')
|
||||
|
||||
Reference in New Issue
Block a user