GitHub
Connect GitHub to Membership — let your users sign in with GitHub.
Lets your users sign in with their GitHub account, through a GitHub OAuth App.
Get your credentials
On GitHub, click your profile picture → Settings → Developer settings → OAuth apps.
Press New OAuth App (or Register a new application). Fill Application name, Homepage URL and Authorization callback URL, then Register application.
Copy the Client ID from the app page. Press Generate a new client secret and copy the secret.
Source: GitHub, Creating an OAuth app.
Connect it in Cloud
Where: Membership → Integrations → Add New Integration → GitHub → Connect · /projects/<project>/membership/integrations/new/github
Fill the form and press Save. The form stays open as Editing GitHub integration with the ENABLED badge and the new id (int_4EZ3ooFfOKjEVBKIVjYzTJ).
Client Id
yes (new)
The OAuth App client id.
Iv1.example00000000
Client Secret
yes
The matching client secret. Encrypted on save and never shown again.
example-not-a-secret (made up)
Integration Name
yes
The name in your integrations list.
GitHub sign-in
OAuth Modes — press Add OAuth mode for each surface of your app (web, mobile, admin) that signs in with this provider:
Mode name
yes
A name for the surface.
web
Callback URL
yes
Where the user lands in your app after signing in.
https://app.example.com/auth/github/callback
Logout URL (optional)
no
Where the user lands after signing out.
—
Failure redirect URL (optional)
no
Where the user lands when the sign-in fails.
https://app.example.com/sign-in?failed=1
Role to assign on first sign-in (optional)
no
The role a new user gets on the first sign-in.
—



Test and set as default
Membership integrations have no Test and no Set as default in Cloud — see Test an integration and Set an integration as default. Check the values against the provider's console; Actions → Disable turns the integration off — see Disable or delete an integration.
Common errors
Required under a field
A required field is empty.
Fill it; on a saved integration, type the secret again.
Secret is not provided (CM-ERRORS-SECRETS-001)
Saved from code without the secret.
Send the secret on every save.
The redirect_uri MUST match the registered callback URL (at GitHub)
The address your app sends is not the Authorization callback URL.
Change the OAuth App, or the address your app sends.
Messages marked (at …) are the provider's own, shown to the user while signing in; see the provider documentation.
Do it from code
With the SDK, send the same object as integration to saveMembershipIntegration — see the run example on Providers and in Save Membership Integration. Send isEnabled: true; to update, add the id as integrationId and the secret again. API: Save Membership Integration
Last updated
Was this helpful?