mirror of
https://github.com/logto-io/logto.git
synced 2025-03-24 22:41:28 -05:00
docs(connector-github): add GitHub README.md (en-US) (#1258)
This commit is contained in:
parent
8c46eada4b
commit
03951a24c5
5 changed files with 49 additions and 6 deletions
|
@ -27,7 +27,7 @@ Alipay Native connector works closely with Logto SDK on mobile platforms. It tak
|
|||
- Fill out the `privateKey` field with contents from the private key file mentioned in step 2. Remember to use '\n' to replace all newlines.
|
||||
- Fill out the `signType` filed with 'RSA2' due to the `Public key` signing mode we chose in step 7 of **Create And Configure Alipay Apps**.
|
||||
|
||||
## Settings
|
||||
### Config types
|
||||
|
||||
| Name | Type | Enum values |
|
||||
|:----------:|:-----------:|:---------------:|
|
||||
|
|
|
@ -27,7 +27,7 @@ Alipay Web connector is designed for desktop Web applications. It takes advantag
|
|||
- Fill out the `privateKey` field with contents from the private key file mentioned in step 2. Remember to use '\n' to replace all newlines.
|
||||
- Fill out the `signType` filed with 'RSA2' due to the `Public key` signing mode we chose in step 7 of **Create And Configure Alipay Apps**.
|
||||
|
||||
## Settings
|
||||
### Config types
|
||||
|
||||
| Name | Type | Enum values |
|
||||
|:----------:|:-----------:|:---------------:|
|
||||
|
|
|
@ -27,7 +27,7 @@ The Facebook connector provides a concise way for your application to use Facebo
|
|||
- Fill out the `clientId` field with the string from **App ID**.
|
||||
- Fill out the `clientSecret` field with the string from **App secret**.
|
||||
|
||||
## Settings
|
||||
### Config types
|
||||
|
||||
| Name | Type |
|
||||
|:------------:|:------:|
|
||||
|
|
|
@ -1,2 +1,45 @@
|
|||
### Github Social Connector README
|
||||
placeholder
|
||||
# Github
|
||||
|
||||
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](https://github.com/) 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](https://docs.github.com/en/developers/apps/building-oauth-apps/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](https://docs.github.com/en/developers/apps/building-github-apps/creating-a-github-app).
|
||||
|
||||
## Managing GitHub OAuth apps
|
||||
|
||||
Go to the [OAuth Apps page](https://github.com/settings/developers) 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](https://github.com/settings/apps).
|
||||
|
||||
## 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.
|
||||
|
||||
```json
|
||||
{
|
||||
"clientID": "<your-client-id>",
|
||||
"clientSecret": "<your-client-secret>"
|
||||
}
|
||||
```
|
||||
|
||||
### Config types
|
||||
|
||||
| Name | Type |
|
||||
|--------------|--------|
|
||||
| clientId | string |
|
||||
| clientSecret | string |
|
||||
|
|
|
@ -47,7 +47,7 @@ Now you should have the Google OAuth 2.0 consent screen configured.
|
|||
- Click **+ Add URI** in the ****Authorized redirect URIs**** section to set up the ****Authorized redirect URIs****, which redirect the user to the application after logging in. In our case, this will be `${your_logto_origin}/callback/google-universal`. e.g. `https://logto.dev/callback/google-universal`.
|
||||
- Click **Create** to finish and then you will get the **Client ID** and **Client Secret**.
|
||||
|
||||
## Settings
|
||||
### Config types
|
||||
|
||||
| Name | Type |
|
||||
|:------------:|:------:|
|
||||
|
|
Loading…
Add table
Reference in a new issue