passport-discord
passport-discord copied to clipboard
Passport strategy for authentication with Discord (discordapp.com)
If you're using the guilds scope, always put IDENTIFY before GUILDS in the scope array.
ReferenceError: err is not defined at Strategy._verify (/Users/nas/Desktop/bot_web/index.js:25:5) at /Users/../Desktop/bot_web/node_modules/passport-oauth2/lib/strategy.js:193:24 at /Users/../Desktop/bot_web/node_modules/passport-discord/lib/strategy.js:87:24 at /Users/../Desktop/bot_web/node_modules/passport-discord/lib/strategy.js:103:13 at passBackControl (/Users/../Desktop/bot_web/node_modules/oauth/lib/oauth2.js:134:9) at IncomingMessage. (/Users/../Desktop/bot_web/node_modules/oauth/lib/oauth2.js:157:7) at IncomingMessage.emit (events.js:165:20) at endReadableNT (_stream_readable.js:1101:12) at process._tickCallback (internal/process/next_tick.js:152:19)
Error: Unknown authentication strategy "discord" at attempt (C:\Users\\#####\djs-bot\backend\node_modules\passport\lib\middleware\authenticate.js:190:39) at authenticate (C:\Users\#####\djs-bot\backend\node_modules\passport\lib\middleware\authenticate.js:367:7) at Layer.handle [as handle_request] (C:\Users\#####\djs-bot\backend\node_modules\express\lib\router\layer.js:95:5) at next (C:\Users\#####\djs-bot\backend\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (C:\Users\#####\djs-bot\backend\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (C:\Users\#####\djs-bot\backend\node_modules\express\lib\router\layer.js:95:5) at C:\Users\#####\djs-bot\backend\node_modules\express\lib\router\index.js:281:22 at...
I've got a site which has two domain names leading to the same underlying nodejs process through a proxy. Is there any way to have two different callbackurls and choose...
```js const Express = require('express'); const app = Express(); let { Strategy } = require('passport-discord'); let Passport = require('passport'); app.use(Passport.initialize()); app.use(Passport.session()); let tag; Passport.use(new Strategy({ clientID: '755551678337515591', clientSecret: 'clientsecret', callbackURL:...
Now getting this error, friends had to change oauth so it works, but I'm not sure what to do: ## Error ``` InternalOAuthError: Failed to obtain access token at Strategy.OAuth2Strategy._createOAuthError...
When trying to login, it giving this error:  Why?
The prompt strategy value no longer works. Code: ``` passport.use(new Strategy({ clientID: process.env.CLIENT_ID, clientSecret: process.env.CLIENT_SECRET, callbackURL: `${process.env.BASE_URL}/callback`, scope: ["identify", "guilds"], prompt: "none", }, (accessToken, refreshToken, profile, done) => {\ process.nextTick(()...
When experiencing a lot of requests, you sometimes get rate limited on fetching guilds. This allows you to add a scopeDelay to avoid it. Solves issue #27