Skip to content

Commit

Permalink
fix: refresh token infinite loop error (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
2paperstar authored Feb 22, 2024
1 parent 3537b7a commit d71935e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class AuthorizeInterceptor extends Interceptor {
RequestOptions options, RequestInterceptorHandler handler) async {
final expired = await _repository.hasExpired();
try {
if (expired) {
if (expired && !options.extra.containsKey(retriedKey)) {
final token = await _api.refresh();
await _repository.saveToken(token.accessToken, token.expiresIn);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: ziggle
description: ziggle
publish_to: 'none'
version: 3.1.2
version: 3.1.3

environment:
sdk: '>=3.1.0 <4.0.0'
Expand Down

0 comments on commit d71935e

Please sign in to comment.