lvwerra HF Staff commited on
Commit
2c39198
·
verified ·
1 Parent(s): 0d14b54

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. server/auth.js +2 -2
server/auth.js CHANGED
@@ -75,7 +75,7 @@ export function registerAuthRoutes(app) {
75
  })
76
 
77
  app.get('/auth/logout', (req, res) => {
78
- res.setHeader('set-cookie', `${COOKIE}=; Path=/; Max-Age=0`)
79
  res.redirect('/')
80
  })
81
 
@@ -96,7 +96,7 @@ export function registerAuthRoutes(app) {
96
  app.get('/auth/login', (req, res) => {
97
  const state = crypto.randomBytes(16).toString('hex')
98
  const next = safeNext(req.query.next)
99
- res.setHeader('set-cookie', `ie_oauth=${state}:${encodeURIComponent(next)}; Path=/; Max-Age=600; HttpOnly; SameSite=Lax; Secure`)
100
  const url = new URL(`${PROVIDER}/oauth/authorize`)
101
  url.searchParams.set('client_id', CLIENT_ID)
102
  url.searchParams.set('redirect_uri', `${HOST}/auth/callback`)
 
75
  })
76
 
77
  app.get('/auth/logout', (req, res) => {
78
+ res.setHeader('set-cookie', `${COOKIE}=; Path=/; Max-Age=0;${cookieFlags()}`)
79
  res.redirect('/')
80
  })
81
 
 
96
  app.get('/auth/login', (req, res) => {
97
  const state = crypto.randomBytes(16).toString('hex')
98
  const next = safeNext(req.query.next)
99
+ res.setHeader('set-cookie', `ie_oauth=${state}:${encodeURIComponent(next)}; Path=/; Max-Age=600;${cookieFlags()}`)
100
  const url = new URL(`${PROVIDER}/oauth/authorize`)
101
  url.searchParams.set('client_id', CLIENT_ID)
102
  url.searchParams.set('redirect_uri', `${HOST}/auth/callback`)