Update SproutGate

This commit is contained in:
2026-05-13 12:19:36 +08:00
parent f7db8aa053
commit a37b92e144
51 changed files with 12034 additions and 254 deletions

View File

@@ -0,0 +1,19 @@
# OAuth 2.0 第三方登录分提供商教程Golang
本目录为**通用**接入说明,适用于任意自建后端或 BFF在对应**身份提供商IdP**注册应用,使用 **OAuth 2.0 授权码Authorization Code**`access_token`,再调用各平台用户 API。语言示例统一为 **Go**`golang.org/x/oauth2`)。
| 文档 | 说明 |
|------|------|
| [github.md](github.md) | GitHub OAuth App标准 `github.Endpoint` |
| [gitea.md](gitea.md) | 自建/托管 Gitea 的 OAuth2端点随实例 URL 变化 |
| [linuxdo.md](linuxdo.md) | LINUX DO Connect官方 Connect 端点) |
| [google.md](google.md) | Google 账号,官方 `google.Endpoint` + userinfo |
| [microsoft.md](microsoft.md) | Microsoft / Entra IDv2.0 终结点 + Microsoft Graph |
**共同前提**
- 浏览器中完成授权;`redirect_uri` 必须在 IdP 控制台**逐字登记**(含 `http`/`https`、主机、端口、路径)。
- 换 token 与调用户 API 一般由**你的服务端**发起;请保证服务器出网可达对应域名(企业网络/地区网络可能需代理)。
- 生产环境使用 **HTTPS**`state` 参数防 CSRF勿省略。
以下各篇相互独立,可按需只读其一。