where to store - access token and refresh token in OAuth 2.0

前端 未结 1 1743
小鲜肉
小鲜肉 2020-12-31 18:08

I am new to OAuth 2.0 and I wish to know what is the best practice / location to store access token and refresh token in generic e-commerce web site.

Question 1:

相关标签:
1条回答
  • 2020-12-31 19:04

    A1: access token has a much shorter time-to-live than refresh token, you may store refresh token in local storage or even other secure storage on server side; for access token, both web storage and local storage are fine; storing access token in cookie does not make much sense

    A2: yes, hence refresh token should not be stored on client side;

    A3: stored it on server/service side

    0 讨论(0)
提交回复
热议问题