umijs / umi-request

A request tool based on fetch.
2.21k stars 335 forks source link

How to use RequestConfig based on @umijs/max to make the front end insensitive to refresh tokens #324

Open kokman opened 1 year ago

kokman commented 1 year ago

Here's how I think about it: After a user's login, they have got two tokens (access and refresh) from the server. Before sending a request, if the access token is found to have expired, it waits to obtain a new access token from the server before continuing the current request.

May I ask who can provide reference code? Thanks!