-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TokenAuthenticator setup #228
Comments
kaungkhantsoe
added a commit
that referenced
this issue
Jan 6, 2023
kaungkhantsoe
added a commit
that referenced
this issue
Jan 6, 2023
kaungkhantsoe
added a commit
that referenced
this issue
Jan 6, 2023
kaungkhantsoe
added a commit
that referenced
this issue
Jan 6, 2023
kaungkhantsoe
added a commit
that referenced
this issue
Jan 6, 2023
@hoangnguyen92dn @ryan-conway @nimblehq/chapter-android According to some edge cases we have faced and resolved in the recent projects regarding the refresh-token mechanism, this task should be in a higher priority to prepare the stable implementation for the following projects. |
kaungkhantsoe
added a commit
that referenced
this issue
May 30, 2024
kaungkhantsoe
added a commit
that referenced
this issue
May 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why
Most of the apps use API requests and have a
refresh token
mechanism to request new access tokens in case they expire. We don't have the setup for the initialTokenAuthenticator
yet, so we should add it to our templates.The initial Authenticator needs to contain:
synchronized(this) {}
when executing the refresh token and rebuild the request to handle multiple authenticator calls at a time.Who Benefits?
Developers
who use this template to initialize their project with network requests.I think this is essential because most of apps have API request and have refresh token mechanism. Having a standard setup would help us a lot in development and reduce mistakes.
Example of implementation: https://github.com/nimblehq/toyota-wallet-android/blob/main/data/src/main/java/co/omise/gcpf/service/authenticator/ApplicationRequestAuthenticator.kt
The text was updated successfully, but these errors were encountered: