Skip to content

Github Mobile

Scenario Introduction

Overview

Github social login allows users to log in to third-party applications or websites securely using Github as the identity source. Configure and enable Github social login in GenAuth to quickly obtain Github's basic open information and help users log in without passwords.

Application Scenario

Mobile

End User Preview

drawing

Notes

  • If you do not have a Github account, please go to GitHub to register a developer account.
  • Follow the instructions in the GitHub documentation to create a GitHub OAuth application and record the application's Client ID and Client Secret.
  • If you don't have a GenAuth console account, please go to the GenAuth console to register a developer account.

Step 1: Create an OAuth application in Github

  • In the upper-right corner of any Github page, click your profile photo, and then click Settings.

  • In the left column, click <> Developer settings.

  • In the left sidebar, click OAuth applications.

  • Click New OAuth App.

  • In Application name, enter a name for the application.

  • In Homepage URL, enter the full URL of your application's website.

  • In Authorization callback URL, enter the callback URL for your application.

During the application creation process, you need to configure the allowed callback address. Please use the following settings: https://core.genauth.ai/connection/social/<Unique Identifier>/<USERPOOL_ID>/callback. You need to replace <Unique Identifier> with your Unique Identifier and <USERPOOL_ID> with your User Pool ID

Step 2: Configure Github Mobile in the GenAuth console

2.1 Please click the "Create Social Identity Source" button on the "Social Identity Source" page of the GenAuth console to enter the "Select Social Identity Source" page.

2.2 Please go to the GenAuth console's "Social Identity Source" - "Select Social Identity Source" page, click the "Github Mobile" identity source button to enter the "Github Mobile Login Mode" page.

2.3 Please go to the GenAuth console's "Social Identity Source" - "Github Mobile" page to configure the relevant field information.

Field/FunctionDescription
Unique IDa. The unique ID consists of lowercase letters, numbers, and -, and is less than 32 bits long. b. This is the unique ID of this connection and cannot be modified after setting.
Display nameThis name will be displayed on the button of the terminal user's login interface.
Client IDThe Client ID applied for on Github needs to be obtained on Github.
Client secretsThe Client secrets applied for on Github need to be obtained on Github.
Callback addressGithub valid redirect URI. This URL needs to be configured on Github.
Login modeAfter turning on "Login only mode", you can only log in to existing accounts, and cannot create new accounts. Please choose carefully.
Account identity associationWhen "Account identity association" is not turned on, a new user is created by default when a user logs in through an identity source. After turning on "Account identity association", users can be allowed to log in directly to an existing account through "field matching".

After the configuration is completed, click the "Create" or "Save" button to complete the creation.

After creating the "Github Mobile" identity source on the GenAuth console, you need to configure the callback address to the Authorization callback URL on Github.

Step 3: Development access

  • Recommended development access method: SDK

  • Pros and cons description: Simple operation and maintenance, GenAuth is responsible for operation and maintenance. Each user pool has an independent secondary domain name; if you need to embed it in your application, you need to log in using the pop-up mode, that is: after clicking the login button, a window will pop up with the content of the login page hosted by GenAuth, or redirect the browser to the login page hosted by GenAuth.

  • Detailed access method:

    3.1 Create an application in the GenAuth console. For details, see: How to create an application in GenAuth

    3.2 On the created Github identity source connection details page, open and associate an application created in the GenAuth console

3.3 Experience Github third-party login on the login page (as shown in the [end-user preview](#end-user preview)).

Agent infrastructure for identity, memory, and web action.