0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/connectors/connector-github
simeng-li 76a985cc8a
chore(deps): update tsup dependency version (#6733)
chore: update tsup dependency version

update tsup dependency version
2024-10-28 13:42:11 +08:00
..
src fix(connector): fix GitHub connector GET /emails forbidden error (#5925) 2024-05-29 04:24:04 +00:00
CHANGELOG.md release: version packages (#6197) 2024-08-08 13:00:14 +08:00
logo-dark.svg
logo.svg
package.json chore(deps): update tsup dependency version (#6733) 2024-10-28 13:42:11 +08:00
README.md chore(connector): update outdated links in connector readme (#6039) 2024-06-18 17:47:49 +08:00

Github connector

The official Logto connector for GitHub social sign-in.

Table of contents

Get started

The GitHub connector enables end-users to sign in to your application using their own GitHub accounts via GitHub OAuth 2.0 authentication protocol.

Sign in with GitHub account

Go to the GitHub website and sign in with your GitHub account. You may register a new account if you don't have one.

Create and configure OAuth app

Follow the creating an OAuth App guide, and register a new application.

Name your new OAuth application in Application name and fill up Homepage URL of the app. You can leave Application description field blank and customize Authorization callback URL as ${your_logto_origin}/callback/${connector_id}. The connector_id can be found on the top bar of the Logto Admin Console connector details page.

Note: If you encounter the error message "The redirect_uri MUST match the registered callback URL for this application." when logging in, try aligning the Authorization Callback URL of your GitHub OAuth App and your Logto App's redirect URL (of course, including the protocol) to resolve the issue.

We suggest not to check the box before Enable Device Flow, or users who sign in with GitHub on mobile devices must confirm the initial sign-in action in the GitHub app. Many GitHub users do not install the GitHub mobile app on their phones, which could block the sign-in flow. Please ignore our suggestion if you are expecting end-users to confirm their sign-in flow. See details of device flow.

Managing OAuth apps

Go to the OAuth Apps page and you can add, edit or delete existing OAuth apps. You can also find Client ID and generate Client secrets in OAuth app detail pages.

Configure your connector

Fill out the clientId and clientSecret field with Client ID and Client Secret you've got from OAuth app detail pages mentioned in the previous section.

scope is a space-delimited list of scopes. If not provided, scope defaults to be read:user.

Config types

Name Type
clientId string
clientSecret string
scope string

Test GitHub connector

That's it. The GitHub connector should be available now. Don't forget to Enable connector in sign-in experience.

Reference