Skip to content

Instantly share code, notes, and snippets.

@kohasummons
Last active November 6, 2024 10:22
Show Gist options
  • Select an option

  • Save kohasummons/fa1afe70270fcaa4b2980634519eb13d to your computer and use it in GitHub Desktop.

Select an option

Save kohasummons/fa1afe70270fcaa4b2980634519eb13d to your computer and use it in GitHub Desktop.
Patreon Social Login Integration for SuperTokens
// Shared by Cj_Clippy in the community Discord
ThirdPartyNode.init({
signInAndUpFeature: {
providers: [{
config: {
requireEmail: false,
authorizationEndpoint: 'https://www.patreon.com/oauth2/authorize',
tokenEndpoint: 'https://www.patreon.com/api/oauth2/token',
userInfoEndpoint: 'https://www.patreon.com/api/oauth2/v2/identity',
name: 'Patreon',
thirdPartyId: 'patreon',
clients: [{
scope: ['identity', 'identity.memberships'],
clientId: configs.patreonClientId,
clientSecret: configs.patreonClientSecret
}],
userInfoEndpointQueryParams: {
'fields[user]': 'full_name,email',
},
userInfoMap: {
fromUserInfoAPI: {
userId: "data.id",
email: "data.attributes.email",
}
}
}
},
],
}
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment