💩 Kinda rude to solve token doesn't refresh

This commit is contained in:
LittleSheep 2024-03-24 13:43:23 +08:00
parent 7c8c1025e2
commit b520f27b90

View File

@ -109,7 +109,7 @@ class AuthGuard {
Future<bool> isAuthorized() async {
const storage = FlutterSecureStorage();
if (await storage.containsKey(key: storageKey)) {
if (client != null && client!.credentials.isExpired) {
if (client != null) {
await refreshToken();
}
return true;