OAuth 2 access_token vs OpenId Connect id_token

前端 未结 4 2022
栀梦
栀梦 2020-12-05 09:46

Although I have worked with OAuth 2 before, I am a newbie to Open ID Connect.

Reading the tutorials and documentations I have come across both access_token<

4条回答
  •  隐瞒了意图╮
    2020-12-05 10:35

    Here is an article that describes why the id_token was introduced and what was it's initial purpose: Why we need a id_token in OpenID Connect & Facebook Connect. In short they tried to standardize the Hybrid Flow that was used by the Facebook.

    We considered was using the id_token as the access_token. We rejected that option because:

    • Many providers have existing OAuth token formats for there endpoints that wo uld be difficult to change.
    • We don't want long term access tokens being stored in the browser as cookies.
    • There are clearly separate recipients of the two tokens overloading the semantics of the two tokens would reduce flexibility and increase complexity in the long term.

提交回复
热议问题