Comments (6)
Hey @botv thanks for raising the issue, we will take a look and see what is going on
from passport-auth0.
@botv this appears to be happening on the Auth0 server side. Passport is passing the correct encoding of connection_scope
to Auth0 url, but the redirect from the Auth0 server to Discord seems to be trying to join the connection_scope
with scope
and making identify email guilds.join,identify
. I will reach out to the team that maintains this connection and see if we can get to the bottom of this.
from passport-auth0.
@davidpatrick any update on this?
from passport-auth0.
Hey @botv I just got back from vacation today, sorry for the delay. It looks like our authorize endpoint currently accepts comma delimited lists for connection_scope
as documented here https://auth0.com/docs/connections/adding-scopes-for-an-external-idp#2-pass-scopes-to-authorize-endpoint
I am waiting for clarification from the team on supporting this space delimited lists, which is what Discord is expecting.
from passport-auth0.
Sounds great, and thanks so much for the support. Any idea how soon we'll hear about this? We're waiting on this patch to switch to Auth0, Discord doesn't support wildcard redirects so the faster we can get this fixed the better.
from passport-auth0.
Okay @botv it looks like you will need to patch the connection through the Auth0 Management API. You can do this directly through the documentation https://auth0.com/docs/api/management/v2#!/Connections/patch_connections_by_id the id will be your connection identifier con_dZGkZnKPGP1ZzBt7
and your payload will look something like (set the client creds):
{
"options": {
"scripts": {
"fetchUserProfile": "function fetchUserProfile(accessToken, context, callback) {\n request.get({\n url: 'https://discordapp.com/api/users/@me',\n headers: {\n 'Authorization': 'Bearer ' + accessToken\n }\n },\n (err, resp, body) => {\n if (err) {\n return callback(err);\n }\n\n if (resp.statusCode !== 200) {\n return callback(new Error(`[Response code: ${resp.statusCode}] ${body}`));\n }\n\n let bodyParsed;\n try {\n bodyParsed = JSON.parse(body);\n } catch (jsonError) {\n return callback(new Error(body));\n }\n\n return callback(null, bodyParsed);\n });\n}"
},
"icon_url": "https://cdn.auth0.com/marketplace/catalog/content/assets/creators/discord/discord-avatar.png",
"tokenURL": "https://discordapp.com/api/oauth2/token",
"client_id": "", // set your client id
"client_secret": "", // set your client secret
"authorizationURL": "https://discordapp.com/api/oauth2/authorize",
"integration_name": "discord"
}
}
You can verify it has the correct scope by retrieving the connection through https://auth0.com/docs/api/management/v2#!/Connections/get_connections_by_id
from passport-auth0.
Related Issues (20)
- Cannot read property 'split' of undefined in Profile.js with GSuite login HOT 5
- TypeError: Cannot read property 'authParams' of undefined HOT 4
- 1.2.1 -> 1.3.1 upgrade causes "Cannot read property 'scope' of undefined" HOT 1
- Consider releasing 1.3.2 ASAP HOT 2
- Allow arbitrary URL parameters for login redirect HOT 3
- Having a session is now required HOT 3
- new Auth0Strategy() returns profile, profile does not return app_metadata HOT 7
- Documentation link is no longer using this library HOT 2
- Login loop when using multiple frontend instances on the same url HOT 2
- Strategy does not support OAuth 2.0 Form Post Response Mode HOT 1
- Usage with Auth0.js checkSession or similar HOT 2
- Options values being overwritten by defaults
- Request is deprecated HOT 6
- Passing my own state doesn't work with openid scope? HOT 6
- Unable to verify authorization request state HOT 3
- easy access to user profile and populating on frontend
- Error: Nonce (nonce) claim must be a string present in the ID token HOT 9
- Please upgrade axios to >1.6.0 HOT 7
- crypto.randomBytes throws TypeError in Node v20 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from passport-auth0.