Skip to main content

GitHub

Set up GitHub as a social login provider in SecureAuth Connect so users can sign in with their GitHub account.

Register GitHub as a provider

  1. In your workspace, go to Authentication > Providers.

  2. Click Create Connection.

  3. Filter by Social Providers and select GitHub. Create Connection page showing available social providers

  4. Choose a registration mode:

    ModeDescription
    EmbeddedUses a client application registered by SecureAuth. No developer portal registration required.
    Bring your OwnUses a client application registered by your organization. Requires registering an OAuth application in your GitHub developer settings to obtain a Client ID and Client Secret.

    GitHub Configuration tab showing Embedded mode and Display order

Configuration

SettingDescription
NameDisplay name for this provider. Default: GitHub.
Display orderControls the position of this provider on the sign-in page. Default: 0.

Use Try Sign-in to test the GitHub sign-in flow. Use Delete Identity to remove this provider.

GitHub sign-in page shown when testing with Try Sign-in

Attributes

GitHub returns the following attributes after authentication:

Connector nameFriendly nameData typeScope
loginLoginStringGitHub Authenticated User Data
idIDNumberGitHub Authenticated User Data
site_adminSite adminBooleanGitHub Authenticated User Data
nameNameStringGitHub Authenticated User Data
companyCompanyStringGitHub Authenticated User Data
emailEmailStringGitHub Authenticated User Data
first_nameFirst nameStringGitHub Authenticated User Data
last_nameLast nameStringGitHub Authenticated User Data
groupsGroupsList of stringsCustom

GitHub returns more attributes than most social providers, including login (GitHub username), company, site_admin (whether the user is a GitHub site administrator), and groups (organization or team memberships).

To add custom attributes, click + Add attribute.

Mappings

Default attribute mappings from GitHub to the SecureAuth authentication context:

SourceGitHub source nameSecureAuth target name
GitHub Authenticated User DataNameName
GitHub Authenticated User DataEmailEmail
GitHub Authenticated User DataFirst nameGiven name
GitHub Authenticated User DataLast nameFamily name
CustomGroupsList of groups that user belongs to

To customize, click + Add mapping or + Add static mapping.

Provisioning

Provisioning controls what happens when a user authenticates through GitHub.

Disabled

Users are not persisted in the user store. Authentication succeeds but no user record is created.

Just-in-Time Provisioning

Users are persisted in the user store on first login.

Identifier Correlation
Maps the incoming GitHub identity to an existing user. Default: GitHub Email ↔ Users Email.

Attribute Provisioning
Maps GitHub attributes to user profile fields. Defaults:

  • EmailEmail
  • Given nameFirst name
  • Family nameLast name

Provisioning tab with Just-in-Time Provisioning selected, showing Identifier Correlation and Attribute Provisioning

Pre provisioning mode

Users must already exist in the user store before they can authenticate. New users are not auto-created at login; they must be added via an offline process.

Authentication flow control
Select what happens when no matching user is found:

  • Deny – Terminate the authentication flow.
  • Allow – Proceed with the authentication flow.

Identifier Correlation
Maps the incoming GitHub identity to an existing user. Default: GitHub Email ↔ Users Email.

Attribute Provisioning
Maps GitHub attributes to user profile fields. Defaults:

  • EmailEmail
  • Given nameFirst name
  • Family nameLast name

Provisioning tab with Pre provisioning mode selected, showing Authentication flow control and Attribute Provisioning

Extensions

ExtensionDescription
Post Authentication scriptA server-side script that runs after GitHub authentication completes. Click Manage Script to configure.
Post Authentication applicationA custom application that receives a callback after GitHub authentication completes. Click Manage Custom App to configure.

See also