mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 17:23:08 +02:00
feat(http): prompt=none
(closes #507)
This commit is contained in:
parent
1b0b0a22f9
commit
5e5de6b4d9
@ -25,13 +25,7 @@ module.exports = async client => {
|
|||||||
fastify.states = new Map();
|
fastify.states = new Map();
|
||||||
fastify.register(oauth, {
|
fastify.register(oauth, {
|
||||||
callbackUri: `${process.env.HTTP_EXTERNAL}/auth/callback`,
|
callbackUri: `${process.env.HTTP_EXTERNAL}/auth/callback`,
|
||||||
// checkStateFunction: (req, callback) => {
|
callbackUriParams: { prompt: 'none' },
|
||||||
// if (req.query.state === req.cookies['oauth2-redirect-state']) {
|
|
||||||
// callback();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// callback(new Error('Invalid state'));
|
|
||||||
// },
|
|
||||||
checkStateFunction: async req => {
|
checkStateFunction: async req => {
|
||||||
if (req.query.state !== req.cookies['oauth2-redirect-state']) {
|
if (req.query.state !== req.cookies['oauth2-redirect-state']) {
|
||||||
throw new Error('Invalid state');
|
throw new Error('Invalid state');
|
||||||
|
Loading…
Reference in New Issue
Block a user