SvelteKitAuth Discord Provider does not return id field from profile
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- authentication
Research direction
Start with the Discord provider's profile function and use the linked reproduction URL to confirm the missing field. Trace how the profile result becomes session.user, then verify that the Discord user id is returned alongside name and image when accessing event.locals.getSession().
Written by the indexing model from the issue text.
Description
Provider type
Discord
Environment
"@auth/core": "^0.10.0",
"@auth/sveltekit": "^0.3.6",
Reproduction URL
https://gist.github.com/math280h/c6d1807ee0137dec22e2b5e34363808c
Describe the issue
sveltekitauth Discord provider does not return id field.
How to reproduce
Define:
SvelteKitAuth({
providers: [
Discord({
clientId: DISCORD_CLIENT_ID,
clientSecret: DISCORD_CLIENT_SECRET,
authorization: { params: { scope: "identify" } },
}),
],
}),
Now try accessing it like:
const session = await event.locals.getSession();
const user = session?.user as DiscordProfile;
console.log(user)
Only these fields are returned:
{
name: '<name>',
image: 'https://cdn.discordapp.com/avatars/<user id works here???>/<avatar>.png'
}
Expected behavior
id is returned from profile function.
- Dominant language
- TypeScript
- Stars
- 28.4k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextauthjs/next-auth
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
nextauthjs/next-auth#13495 ·
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
nextauthjs/next-auth#13483 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
nextauthjs/next-auth#13475 ·
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
nextauthjs/next-auth#13472 ·
-
bug triage
Difficulty 1/5 Under an hour Newbie friendliness 68/100
nextauthjs/next-auth#13204 ·
All issues in nextauthjs/next-auth
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·