Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hunghg255/reactjs-handle-refresh-token

Handle refresh token with fetch, axios, umi-request, apollo-client, brainless-token-manager
https://github.com/hunghg255/reactjs-handle-refresh-token

apollo apollo-client axios brainless-token-manager fetch graphql interceptors javascript nextjs react reactjs refresh-token solidjs svelte tokenmanager typescript umi-request vue

Last synced: 30 days ago
JSON representation

Handle refresh token with fetch, axios, umi-request, apollo-client, brainless-token-manager

Awesome Lists containing this project

README

        

# Handle refresh token with `axios`, `umi-request` using interceptors, `apollo-client`, `token-management`, `brainless-token-manager`

### 1. Axios interceptors, Apollo-client
- After all requests failed, we will call a request to take a new access token after that retry all requests which failed

![alt text](./public/axios-umi-request-y-interceptors.png)

### 2. `brainless-token-manager`
- Check access token expire if token expire will call a request to take a new access token after that call requests

[brainless-token-manager](https://www.npmjs.com/package/brainless-token-manager)

![alt text](./public/token-management.png)