[資訊] OAuth 2.0 認證流程

OAuth 2.0 的四種方式

GitHub OAuth 協力廠商登錄示例教程

理解 OAuth 2.0 認證流程

GitHub OAuth 協力廠商登錄示例教程

常見登錄鑒權方案


Authorization Code
假設我們的網站有一個功能是同步用戶在 Github 的所有倉庫。對接 OAuth 流程大致分為 5 個步驟:
1.在 Github 的 OAuth 頁面上註冊網站資訊。在網站發佈前就要做好
2.用戶點擊網站上的“同步 Github 倉庫”按鈕,開始 OAuth 認證流程
3.流覽器彈出 Github 認證視窗,詢問“是否允許網站 XXX 的訪問”,用戶點擊“允許”
4.Github 得知用戶點了“允許”後,生成授權碼(Authorization Code),並將用戶重定向到我們的網站裡,網站後臺收到授權碼後,向 Github 請求ACCESS_TOKEN
5.網站後臺從 Github 收到 ACCESS_TOKEN,接著向 Github 拉取該用戶所有的倉庫




#OAuth 2, ACCESS, TOKEN, Authorization, Code, 認證, 流程

留言

  1. Do this hack to drop 2 lbs of fat in 8 hours

    Over 160,000 women and men are utilizing a easy and secret "water hack" to lose 2lbs each night while they sleep.

    It is very simple and it works on everybody.

    You can do it yourself by following these easy steps:

    1) Go get a glass and fill it with water half the way

    2) Now use this weight losing hack

    and you'll be 2lbs skinnier as soon as tomorrow!

    回覆刪除

張貼留言