Hi I just figured out Patreon social login integra...
# share-your-work
c
Hi I just figured out Patreon social login integration for Supertokens and I wanted to share it somewhere because when I was searching for other code examples of Patreon integration I couldn't find any. I hope this code helps someone in the future who is working on Patreon integration themselves.
Copy code
js
      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",
                }
              }
            }
          },
          ],
        }
      }),
3 Views