Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Eventbrite social provider template #40

Open
yinzara opened this issue Dec 20, 2019 · 0 comments
Open

Add Eventbrite social provider template #40

yinzara opened this issue Dec 20, 2019 · 0 comments

Comments

@yinzara
Copy link

yinzara commented Dec 20, 2019

If you'd like to add Eventbrite to the default list of providers? Here's the config for it

{
"name": "eventbrite",
"strategy": "oauth2",
"options": {
"authorizationURL": "https://www.eventbrite.com/oauth/authorize",
"tokenURL": "https://www.eventbrite.com/oauth/token",
"scope": "openid email",
"scripts": {
"fetchUserProfile": "function(accessToken, ctx, cb) {\n request.get(\n "https://www.eventbriteapi.com/v3/users/me/", {\n headers: {\n Authorization: "Bearer " + accessToken,\n "User-Agent": "Auth0",\n Accept: "application/json"\n }\n },\n function(e, r, b) {\n if (e) {\n return cb(e);\n }\n if (r.statusCode !== 200) {\n return cb(new Error("StatusCode:" + r.statusCode + " Body: " + b));\n }\n const profile = JSON.parse(b);\n if (profile.emails && profile.emails.length > 0) {\n const emails = profile.emails.filter(p => p.primary);\n const email = emails.length > 0 ? emails[0] : profile.emails[0];\n profile.email = email.email;\n profile.email_verified = email.verified;\n delete profile.emails;\n }\n cb(null, profile);\n }\n );\n}"
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant