Skip to content

Commit

Permalink
add: content about google oauth
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhang2003 committed Sep 9, 2024
1 parent 8fe941c commit 5a8e34c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/usage/oauth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import { Steps } from 'nextra/components';
参考以下两篇:

- [在 GitHub 新建 OAuth 应用](https://docs.github.com/zh/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app)
- [在 Google Cloud 新建 OAuth 应用](https://developers.google.com/identity/protocols/oauth2/web-server?hl=zh-cn#creatingcred)
- [在 Google Cloud Console 新建 OAuth 应用](https://developers.google.com/identity/protocols/oauth2/web-server?hl=zh-cn#creatingcred)

对于 GitHub,`Homepage URL` 填写前端地址,`Authorization callback URL` 根据后台提示复制粘贴。

对于 Google,`已获授权的 JavaScript 来源` 填写前端地址,`已获授权的重定向 URI` 根据后台提示复制粘贴。
对于 Google,你可能需要先配置好 OAuth 权限请求页面,其中已获授权的网域填写根域名,API 范围选择非敏感范围的三项。OAuth 应用中 `已获授权的 JavaScript 来源` 填写前端地址,`已获授权的重定向 URI` 根据后台提示复制粘贴。

完成后会获取 Client ID 和 Client Secret,将他们复制下来备用。

Expand Down

0 comments on commit 5a8e34c

Please sign in to comment.