OAuth flow when user is already logged in to the Oauth Provider

隐身守侯 提交于 2019-12-05 10:19:58

Good question. Here's what happens:

  1. Client is redirected to Server page for authorization.
  2. Server (Google) has cookies set in the browser for THEIR domain only (from last time), and can see the user's information.
  3. Server (Google) generates a NEW authorization code, and redirects BACK to the Client webapp with that code.
  4. The Client app then makes an API call to Server with client_id, client_secret, and NEW authorization code token and gets a new access token.
  5. Client app then creates a cookie (or uses local storage) to store this new Access Token and keep the user logged in.
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!