0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/connector-github
2022-07-03 06:54:10 +00:00
..
docs chore(connectors): config template md files to json files (#987) 2022-05-31 12:58:24 +08:00
src refactor(connector-*): load config template and readme contents while initialization (#1252) 2022-06-27 10:00:37 +08:00
CHANGELOG.md release: v0.1.2-alpha.3 2022-07-03 06:54:10 +00:00
jest.config.ts refactor: use @silverhand/jest-config (#861) 2022-05-17 17:32:41 +08:00
logo-dark.svg feat(core,connectors): update Aliyun logo and add logo_dark to Apple, Github (#1194) 2022-06-23 11:12:29 +08:00
logo.svg feat(core): serve connector logo (#931) 2022-05-24 13:54:37 +08:00
package.json release: v0.1.2-alpha.3 2022-07-03 06:54:10 +00:00
README.md docs(connector-aliyun-dm): add Aliyun DM README.md (en-US) (#1263) 2022-06-30 00:01:55 +08:00
tsconfig.base.json feat(core): wrap github connector (#673) 2022-04-28 15:01:55 +08:00
tsconfig.build.json feat(core): wrap github connector (#673) 2022-04-28 15:01:55 +08:00
tsconfig.json feat(core): wrap github connector (#673) 2022-04-28 15:01:55 +08:00
tsconfig.test.json test: allow JS in tests (#903) 2022-05-20 13:02:36 +08:00

Github connector

The GitHub connector enables users to have access 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 GitHub 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/github-universal.

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.

You can also enable end-users to sign in with GitHub accounts by creating a GitHub app.

Managing GitHub 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.

As for managing GitHub Apps we mentioned in the last section, go to the GitHub Apps page.

Compose the connector JSON

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.

Here is an example of GitHub connector config JSON.

{
    "clientID": "<your-client-id>",
    "clientSecret": "<your-client-secret>"
}

Config types

Name Type
clientId string
clientSecret string