Where can I store the OAuth update token in a browser based application

I store the access token and update token in local storage. Is it correct?

Details: I have an angular 2 application. A user downloads my application and then authenticates (username, password) using api. They are given an access token and an update token. The client uses the access token until it expires (15 minutes), and then, after hitting 401, it uses the update token (6 month life) to update the access token.

My setup is similar: http://bitoftech.net/2014/07/16/enable-oauth-refresh-tokens-angularjs-app-using-asp-net-web-api-2-owin/

I saw similar questions and tips to store update tokens on the server, but I'm not quite sure how to do this in my case (as far as I see that the client wants to save this token to be updated locally): where to store - access token and update the token in OAuth 2.0

+4
source share

Source: https://habr.com/ru/post/1652955/


All Articles