From 5e5de6b4d9b6828a9fc4ff3c7d9ceca911d4dce9 Mon Sep 17 00:00:00 2001 From: Isaac Date: Sun, 21 Jan 2024 02:37:56 +0000 Subject: [PATCH] feat(http): `prompt=none` (closes #507) --- src/http.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/http.js b/src/http.js index a43cf34..22196bd 100644 --- a/src/http.js +++ b/src/http.js @@ -25,13 +25,7 @@ module.exports = async client => { fastify.states = new Map(); fastify.register(oauth, { callbackUri: `${process.env.HTTP_EXTERNAL}/auth/callback`, - // checkStateFunction: (req, callback) => { - // if (req.query.state === req.cookies['oauth2-redirect-state']) { - // callback(); - // return; - // } - // callback(new Error('Invalid state')); - // }, + callbackUriParams: { prompt: 'none' }, checkStateFunction: async req => { if (req.query.state !== req.cookies['oauth2-redirect-state']) { throw new Error('Invalid state');