Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.73 KB

oauth2-github.md

File metadata and controls

40 lines (28 loc) · 1.73 KB

Github

Register application

Go to GitHub's OAuth application registration address.

  • Application name fill in any value, such as SyncTV
  • Homepage URL fill in https://<your-domain>
  • Application description can be left blank
  • Authorization callback URL fill in https://<your-domain>/web/oauth2/callback/github
  • Enable Device Flow This function is used to allow users to authorize without a browser. You can leave it unchecked.

After filling in, click the Register application button.

oauth2-github

Get Client ID and Client Secret

After successful registration, the page will jump to the application details page, where you can see Client ID and Client Secret.

If the jump fails, you can find the application you just created in OAuth Application List and click to enter the details page.

The Client ID can be viewed and copied at any time.

When creating an application for the first time, the Client Secret is empty and needs to be generated by clicking the Generate a new client secret button.

Client Secret can only be viewed once. If you forget it, you can click the Generate a new client secret button to regenerate it.

oauth2-github-client

Fill in the configuration

Fill in client_id and client_secret in config.yaml.

oauth2:
     providers:
         github:
             client_id: xxxxxx
             client_secret: xxxxxx
             redirect_url: ""

redirect_url does not need to be filled in, because each application of github only supports one redirect_url.