How secure is Oauth 2.0 Implicit Grant?

后端 未结 3 1602
南旧
南旧 2020-12-14 11:45

In Implicit Grant, the access token is sent back in the callback URL. Is this not a security risk because, if this callback URL is cached in the hop. In general it is advise

3条回答
  •  臣服心动
    2020-12-14 12:10

    Elaborating on @vlatko's response...

    To mitigate the risk of sending the token in the fragment (or via any other OAuth2 grant):

    • ensure that the OAuth endpoint and the callback endpoint are TLS (https) (See countermeasures)
    • send a state parameter to prevent cross-site forgery (Also see: http://tools.ietf.org/html/rfc6749#section-4.2.1)

    Issuing short-lived access token (as @vlatko said) will reduce the impact of a leaked token, but is not a preventative measure.

提交回复
热议问题