Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する

Configure GitHub login

zhanghan
2024-11-05 14:10
· edited

Github provides OAuth login method, users can log in to GitHub OAuth-enabled applications through their GitHub accounts. For users, they no longer need to remember different accounts and passwords; for applications, there is no need to develop their own login and registration system. So, it is a good thing for both users and application developers.

The Blocklet Server supports configuring and enabling GitHub login for a Blocklet. Below is how to configure GitHub login in a Blocklet and use a GitHub account to complete the login.

  1. Sign up for a GitHub account
  2. Create GitHub OAuth project
    • Open https://github.com/settings/developers
    • Click New OAuth App, fill in the corresponding information as prompted on the page. Replace demo.blocklet.dev with the domain of the Blocklet for GitHub login configuration as shown in the figure below.
      • Application name: Fill in the application name, support customization.
      • Homepage URL: Fill in the address of the application homepage, such as: https://demo.blocklet.dev, remember to replace demo.blocklet.dev with the domain of your application.
      • Authorization callback URL: Fill in the callback address of the application, such as: https://demo.blocklet.dev/.well-known/service/oauth/callback/github, remember to replace demo.blocklet.dev with the domain of your application.
      • image.png

    • Click on Register application, and you will be taken to the details page of this OAuth project.
    • Click Generate a new client secret
      • image.png

    • Save Client ID and Client secrets
  1. Configure Blocklet
    • Arrive at the control panel of Blocklet, click "Dashboard", "Configuration", "Login", "Third Party Login" in sequence.
      • image.png

    • fill in the Client ID that was just saved, Client Secret, save
  2. At this time on the login page of Blocklet, you can now see the option to log in with GitHub.
    • Click on GitHub to log in.
      • image.png

Sticker