Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- 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;
|
| 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`)
|