Skip to content

Commit

Permalink
[skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
hoc081098 authored Jul 9, 2021
1 parent 85e9174 commit 4423755
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# Refresh Token Sample
# Android Refresh Token Sample :repeat_one:

Android Refresh token with Retrofit and OkHttp

- When multiple requests hit **404** (_HTTP_UNAUTHORIZED_), only single `Refresh token request` will be executed.
- Android Refresh token with Retrofit, OkHttp and Coroutines Mutex.
- When multiple requests hit **401** (_HTTP_UNAUTHORIZED_), only single `Refresh token request` will be executed.
- After successful refresh, all pending requests will be executed concurrently.

## Features

- ✅ Refresh token only once for multiple requests
- ✅ Log out user if refreshToken failed
- ✅ Log out if user gets an error after first refreshing
- ✅ Queue all requests while token is being refreshed

# Run local server
```
cd server
Expand Down

0 comments on commit 4423755

Please sign in to comment.