I added the discord provider but get the next erro...
# support-questions
j
I added the discord provider but get the next error Error: Request failed with status code 401
r
hey @Jota
are you getting a field error with this?
Also, what does your discord config look like?
j
One the frontend `` providers: [ { id: "discord", name: "Discord", buttonComponent: <div style={{ cursor: "pointer", border: "1", paddingTop: "5px", paddingBottom: "5px", borderRadius: "5px", borderStyle: "solid" }}>Login with Discord } ],``
r
and the backend?
j
On the backend `` Discord({ clientId: process.env.DISCORD_OAUTH_CLIENT_ID, clientSecret: process.env.DISCORD_OAUTH_CLIENT_ID, scope: [ 'identify', 'guilds' ] }) ``
The error is this Error: Request failed with status code 401 at createError (C:\Users\joao_\OneDrive\Área de Trabalho\Projetos\aggregator-backend\node_modules\supertokens-node\node_modules\axios\lib\core\createError.js:16:15) at settle (C:\Users\joao_\OneDrive\Área de Trabalho\Projetos\aggregator-backend\node_modules\supertokens-node\node_modules\axios\lib\core\settle.js:17:12) at IncomingMessage.handleStreamEnd (C:\Users\joao_\OneDrive\Área de Trabalho\Projetos\aggregator-backend\node_modules\supertokens-node\node_modules\axios\lib\adapters\http.js:269:11) at IncomingMessage.emit (node:events:538:35) at endReadableNT (node:internal/streams/readable:1345:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)
r
You need to add scope "email"
and try again
j
Still same error
got it
process env was incorrect
r
👍
j
Thank you
I will always need to click on authorize to login?
r
You shouldnt have to. Only when scopes change
j
it always ask me
r
That’s strange. Can you open an issue about this on our GitHub?
We will come around to seeing this tomorrow or day after
2 Views