Closed Bricklou closed 3 years ago
^4.1.0
NodeJS 16.6.1 NPM 7.20.5
Discord authentication need the identify scope to work properly, on the other hand, the email scope is optional: https://github.com/adonisjs/ally/blob/3400eb99c9889a6a843f8058b0a07150d99734f8/src/Drivers/Discord/index.ts#L80 The documentation about the user fetch: https://discord.com/developers/docs/resources/user#get-current-user
identify
email
Here what I had to do to fix temporarily my code:
const allyConfig: AllyConfig = { /* |-------------------------------------------------------------------------- | Discord driver |-------------------------------------------------------------------------- */ discord: { driver: 'discord', clientId: Env.get('DISCORD_CLIENT_ID'), clientSecret: Env.get('DISCORD_CLIENT_SECRET'), callbackUrl: Env.get('DISCORD_REDIRECT_URI'), scopes: ['identify', 'email'], }, }
https://github.com/Bricklou/supportlauncher-market/blob/1f53017fc238bdf218ceb2308235da860b616a35/config/ally.ts#L20-L33
Hey @Bricklou! 👋
Would you mind sending a PR?
Yes, no problem
Package version
^4.1.0
Node.js and npm version
NodeJS 16.6.1 NPM 7.20.5
Sample Code (to reproduce the issue)
Discord authentication need the
identify
scope to work properly, on the other hand, theemail
scope is optional: https://github.com/adonisjs/ally/blob/3400eb99c9889a6a843f8058b0a07150d99734f8/src/Drivers/Discord/index.ts#L80 The documentation about the user fetch: https://discord.com/developers/docs/resources/user#get-current-userHere what I had to do to fix temporarily my code:
https://github.com/Bricklou/supportlauncher-market/blob/1f53017fc238bdf218ceb2308235da860b616a35/config/ally.ts#L20-L33