Skip to content

Instantly share code, notes, and snippets.

@zyfyy
Created December 7, 2021 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zyfyy/3d15f5428485eda13e94f0fd13120cc3 to your computer and use it in GitHub Desktop.
Save zyfyy/3d15f5428485eda13e94f0fd13120cc3 to your computer and use it in GitHub Desktop.
oauth、鉴权
github授权登录流程:
1、A 网站让用户跳转到 GitHub。
2、GitHub 要求用户登录,然后询问"A 网站要求获得 xx 权限,你是否同意?"
3、用户同意,GitHub 就会重定向回 A 网站,同时发回一个授权码。
4、A 网站使用授权码,向 GitHub 请求令牌。
5、GitHub 返回令牌.
6、A 网站使用令牌,向 GitHub 请求用户数据。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment