kevin
kevin
DIAdiscord.js - Imagine an app
Created by kevin on 5/24/2024 in #djs-questions
Invalid_Grant error for OAuth 2.0
Damn
8 replies
DIAdiscord.js - Imagine an app
Created by kevin on 5/24/2024 in #djs-questions
Invalid_Grant error for OAuth 2.0
I realized I posted this in the wrong forum is there a way for me to forward this to #other-js-ts ?
8 replies
DIAdiscord.js - Imagine an app
Created by kevin on 5/24/2024 in #djs-questions
Invalid_Grant error for OAuth 2.0
Error response data: {
error: 'invalid_grant',
error_description: 'Invalid "code" in request.'
}
Error response status: 400
Error response headers: Object [AxiosHeaders] {
date: '',
'content-type': 'application/json',
'content-length': '79',
connection: 'keep-alive',
'cache-control': 'no-store',
pragma: 'no-cache',
'set-cookie': [
'__dcfduid=59c89f9a199411efb52496b81cf4e3c6; Expires=Wed, 23-May-2029 06:10:42 GMT; Max-Age=157680000; Secure; HttpOnly; Path=/; SameSite=Lax',
'__sdcfduid=59c89f9a199411efb52496b81cf4e3c6f6a0733cf375106fe42f53996624652846ff84b51ffe23e72d97909040d0eddb; Expires=Wed, 23-May-2029 06:10:42 GMT; Max-Age=157680000; Secure; HttpOnly; Path=/; SameSite=Lax',
'__cfruid=c3dec741acb51d07e62de15bf0586d06bacc74b6-1716531042; path=/; domain=.discord.com; HttpOnly; Secure; SameSite=None',
'_cfuvid=ITAbKiFgINcOrXciQ0XU.hv0lOK6glW0LTYGgBUSNZA-1716531042409-0.0.1.1-604800000; path=/; domain=.discord.com; HttpOnly; Secure; SameSite=None'
],
'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
via: '1.1 google',
'alt-svc': 'h3=":443"; ma=86400',
'cf-cache-status': 'DYNAMIC',
'report-to': '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=ccHDQwnmVDXDg4MZZxaV0w1%2B%2FEl0MK5zehhyQo9g29WU71gmlw6ZpMn%2BbuZVvZzuTXLEGydhfFTtd9RyxHUDysHv5MrQyAEmM%2FPsm3blcthkITLOy83C%2F2VjByLH"}],"group":"cf-nel","max_age":604800}',
nel: '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}',
'x-content-type-options': 'nosniff',
'content-security-policy': "frame-ancestors 'none'; default-src 'none'",
server: 'cloudflare',
'cf-ray': '888b1fc5dba29023-BOS'
}
Error response data: {
error: 'invalid_grant',
error_description: 'Invalid "code" in request.'
}
Error response status: 400
Error response headers: Object [AxiosHeaders] {
date: '',
'content-type': 'application/json',
'content-length': '79',
connection: 'keep-alive',
'cache-control': 'no-store',
pragma: 'no-cache',
'set-cookie': [
'__dcfduid=59c89f9a199411efb52496b81cf4e3c6; Expires=Wed, 23-May-2029 06:10:42 GMT; Max-Age=157680000; Secure; HttpOnly; Path=/; SameSite=Lax',
'__sdcfduid=59c89f9a199411efb52496b81cf4e3c6f6a0733cf375106fe42f53996624652846ff84b51ffe23e72d97909040d0eddb; Expires=Wed, 23-May-2029 06:10:42 GMT; Max-Age=157680000; Secure; HttpOnly; Path=/; SameSite=Lax',
'__cfruid=c3dec741acb51d07e62de15bf0586d06bacc74b6-1716531042; path=/; domain=.discord.com; HttpOnly; Secure; SameSite=None',
'_cfuvid=ITAbKiFgINcOrXciQ0XU.hv0lOK6glW0LTYGgBUSNZA-1716531042409-0.0.1.1-604800000; path=/; domain=.discord.com; HttpOnly; Secure; SameSite=None'
],
'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
via: '1.1 google',
'alt-svc': 'h3=":443"; ma=86400',
'cf-cache-status': 'DYNAMIC',
'report-to': '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=ccHDQwnmVDXDg4MZZxaV0w1%2B%2FEl0MK5zehhyQo9g29WU71gmlw6ZpMn%2BbuZVvZzuTXLEGydhfFTtd9RyxHUDysHv5MrQyAEmM%2FPsm3blcthkITLOy83C%2F2VjByLH"}],"group":"cf-nel","max_age":604800}',
nel: '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}',
'x-content-type-options': 'nosniff',
'content-security-policy': "frame-ancestors 'none'; default-src 'none'",
server: 'cloudflare',
'cf-ray': '888b1fc5dba29023-BOS'
}
8 replies
DIAdiscord.js - Imagine an app
Created by kevin on 5/24/2024 in #djs-questions
Invalid_Grant error for OAuth 2.0
//client side request
const response = await axios.get(`https://localhost:_____/auth/callback?code=${code}&state=${state}&redirect=${encodeURIComponent(redirect)}`, {
withCredentials: true, // Ensure credentials are included
});
//client side request
const response = await axios.get(`https://localhost:_____/auth/callback?code=${code}&state=${state}&redirect=${encodeURIComponent(redirect)}`, {
withCredentials: true, // Ensure credentials are included
});
8 replies
DIAdiscord.js - Imagine an app
Created by kevin on 5/24/2024 in #djs-questions
Invalid_Grant error for OAuth 2.0
8 replies