1. Home
  2. Tutorials
  3. Integrating Third Party Services
  4. Log the User into GitHub

Log the User into GitHub

github login android You can authenticate your app users with GitHub and access their account data. In order to use GitHub auth in your project, you first need to register the application in your GitHub account. Once you have an app registered, you can use the custom Action in Dropsource to log the user in.
  1. Log into your GitHub account and navigate to your account Settings.

    github settings

    Select OAuth Apps in the Developer Settings section.

    oauth apps
  2. Click Register a new application.

    register oauth

    Enter a name, the URL for a homepage for your app, and a callback URL, which should have the format: customurlscheme:// (you'll be entering the callback URL into Dropsource later so keep a note of it).

    github app settings

    Click Register Application - GitHub will create the application and navigate to its settings.

  3. Take a note of your GitHub app's Client ID and Client Secret - you'll be entering these into Dropsource.

    github app details
  4. In your Dropsource project, add the Log User in with GitHub Action, for example on the Tapped Event of a Button. Enter the Client ID, Client Secret, and Authorization Callback URL from your GitHub app settings, and select the permissions your app needs.

    github login action
    • When the Action runs, the app will navigate to GitHub's login page, where the user will enter their details. When they attempt to login, the user will navigate back to the app, where you can detect success or failure for login. Respond to this status using the nested Successful and Failed Events, for example to navigate to another page if login is successful, and to show an error message in the page if login fails.

      github login flow
You can see a working example of the GitHub login Action in the GitHub IT example app - try it when you create a new project. To achieve similar functionality, including making requests to GitHub's API to manage the user's repositories and issues, check out the GitHub example app video and tutorial series.
Was this article helpful to you? Yes No

How can we help?