1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-04 21:30:05 +00:00

chore: default is desktop mode with prompts

This commit is contained in:
Saad Jutt
2021-11-12 23:59:55 +05:00
parent 46f2648a95
commit cd738aa4b8
17 changed files with 368 additions and 40 deletions

View File

@@ -29,7 +29,7 @@ const authenticateToken = (
tokenType: 'accessToken' | 'refreshToken' = 'accessToken'
) => {
const { MODE } = process.env
if (MODE?.trim() === 'desktop') return next()
if (MODE?.trim() !== 'server') return next()
const authHeader = req.headers['authorization']
const token = authHeader?.split(' ')[1]