N
Nuxt4mo ago
!훅누

discord auth

Hello, I'm trying to make a Discord authentication function with @nuxt-alt/auth
[nuxt] [request error] [unhandled] [400] [POST] "https://discord.com/api/oauth2/token": 400 Bad Request
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Object.handler (D:\Javascript\Arin\frontend\.nuxt\authorize-discord.ts:136:22)
at async /D:/Javascript/Arin/frontend/node_modules/h3/dist/index.mjs:1975:19
at async Object.callAsync (/D:/Javascript/Arin/frontend/node_modules/unctx/dist/index.mjs:72:16)
at async Server.toNodeHandle (/D:/Javascript/Arin/frontend/node_modules/h3/dist/index.mjs:2266:7)
[nuxt] [request error] [unhandled] [400] [POST] "https://discord.com/api/oauth2/token": 400 Bad Request
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at Object.handler (D:\Javascript\Arin\frontend\.nuxt\authorize-discord.ts:136:22)
at async /D:/Javascript/Arin/frontend/node_modules/h3/dist/index.mjs:1975:19
at async Object.callAsync (/D:/Javascript/Arin/frontend/node_modules/unctx/dist/index.mjs:72:16)
at async Server.toNodeHandle (/D:/Javascript/Arin/frontend/node_modules/h3/dist/index.mjs:2266:7)
The above error occurs
// nuxt.config.ts
auth: {
redirect: {
login: '/auth/login',
logout: '/auth/logout',
home: '/',
callback: '/auth/callback',
},
strategies: {
discord: {
clientId: 'bot ID',
clientSecret: "bot secret"
},
},
}
// nuxt.config.ts
auth: {
redirect: {
login: '/auth/login',
logout: '/auth/logout',
home: '/',
callback: '/auth/callback',
},
strategies: {
discord: {
clientId: 'bot ID',
clientSecret: "bot secret"
},
},
}
Login and logout are $auth.loginWith('discord') and There is no button for $auth.logout() in the field. Can someone tell me why I get this error..?
1 Reply
!훅누
!훅누OP4mo ago
.
Want results from more Discord servers?
Add your server