Skip to content
This repository has been archived by the owner on May 13, 2023. It is now read-only.

Commit

Permalink
fix: another try
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Mar 29, 2023
1 parent 35e099f commit 2595fd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/src/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ enum AuthChangeEvent {
userUpdated,
userDeleted,
mfaChallengeVerified,
tokenRefreshFailed,
}

enum GenerateLinkType {
Expand Down
5 changes: 2 additions & 3 deletions lib/src/gotrue_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -689,12 +689,11 @@ class GoTrueClient {
} catch (error, stack) {
if (error is AuthException) {
if (error.message == 'Invalid Refresh Token: Refresh Token Not Found') {
_notifyAllSubscribers(AuthChangeEvent.tokenRefreshFailed);
await signOut();
completer.complete(AuthResponse(session: null, user: null));
}
}
if (!completer.isCompleted) completer.completeError(error, stack);
completer.completeError(error, stack);
_onAuthStateChangeController.addError(error, stack);

return completer.future;
}
Expand Down

0 comments on commit 2595fd1

Please sign in to comment.