Next.js Discord

Discord Forum

Can't modify Discord OAuth's scope list

Unanswered
Bombay posted this in #help-forum
Open in Discord
BombayOP
Hello, it seems like docs say we can extend/modify the default config (https://authjs.dev/guides/providers/custom-provider#override-default-provider-config) for the Discord Oauth package
Doing this however does nothing to scope

providers: [
            Discord({
                clientId: DISCORD_CLIENT_ID,
                clientSecret: DISCORD_CLIENT_SECRET,
                authorization: {
                    params: {
                        scope: "identify guilds guilds.members.read email"
                    }
                },
                profile(profile) {
                    console.log('profile returned: ', profile)
                    return profile
                  },
            })
],


the profile function is indeed modified, but the scope always remains identify email for some reason

5 Replies

BombayOP
this whole thing is a mess, how did no one notice
searchParams (inherited from the default) will always override whatever custom authorization?.params you give? 🤔
also, checks can't be changed or else an error is thrown, only pkce seems to work
Catla
@Bombay Did you find a solution to this?