Last active
November 6, 2024 10:22
-
-
Save kohasummons/fa1afe70270fcaa4b2980634519eb13d to your computer and use it in GitHub Desktop.
Patreon Social Login Integration for SuperTokens
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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