Discord OpenID != Google OpenID?

I KNOW I CAN USE ACCESS_TOKEN, this is specifically about openid (parentheses mean "or", profile or email) Google Scopes: openid, userinfo.profile (userinfo.email) Code exchange response: access_token, id_token, etc id_token: has name (email) Discord Scopes: openid, identify (email) Code exchange response: access_token, id_token, etc id_token: does not have name (email) My fault? Just how discord openid works?
const data = await fetch("https://discord.com/api/oauth2/token", {
method: "POST",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({
client_id: id,
client_secret: process.env.DC_SECRET || "",
redirect_uri: "http://localhost:3000",
scope: "openid identify",
code: code,
grant_type: "authorization_code",
}).toString(),
});
const data = await fetch("https://discord.com/api/oauth2/token", {
method: "POST",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({
client_id: id,
client_secret: process.env.DC_SECRET || "",
redirect_uri: "http://localhost:3000",
scope: "openid identify",
code: code,
grant_type: "authorization_code",
}).toString(),
});
3 Replies
d.js toolkit
d.js toolkit3mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by staff
Syjalo
Syjalo3mo ago
Not related to discord.js
avant
avantOP3mo ago
ok
Want results from more Discord servers?
Add your server