mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
fix: actually revoke the token
This commit is contained in:
parent
73c30c84bd
commit
3e7127a3d9
@ -5,7 +5,11 @@ module.exports.get = fastify => ({
|
|||||||
const { accessToken } = req.user;
|
const { accessToken } = req.user;
|
||||||
|
|
||||||
await fetch('https://discord.com/api/oauth2/token/revoke', {
|
await fetch('https://discord.com/api/oauth2/token/revoke', {
|
||||||
body: new URLSearchParams({ token: accessToken }).toString(),
|
body: new URLSearchParams({
|
||||||
|
client_id: req.routeOptions.config.client.user.id,
|
||||||
|
client_secret: process.env.DISCORD_SECRET,
|
||||||
|
token: accessToken,
|
||||||
|
}).toString(),
|
||||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user