What is the purpose of the implicit grant authorization type in OAuth 2?

前端 未结 12 854
面向向阳花
面向向阳花 2020-11-28 00:28

I don\'t know if I just have some kind of blind spot or what, but I\'ve read the OAuth 2 spec many times over and perused the mailing list archives, and I have yet to find a

12条回答
  •  失恋的感觉
    2020-11-28 00:38

    Here are my thoughts:

    The purpose of auth code + token in authorization code flow is that token and client secret will never be exposed to resource owner because they travel server-to-server.

    On the other side, implicit grant flow is for clients that are implemented entirely using javascript and are running in resource owner's browser. You do not need any server side code to use this flow. Then, if everything happens in resource owner's browser it makes no sense to issue auth code & client secret anymore, because token & client secret will still be shared with resource owner. Including auth code & client secret just makes the flow more complex without adding any more real security.

    So the answer on "what has been gained?" is "simplicity".

提交回复
热议问题