Use TupleKey(ObjectKey-AccountId-UserName) to store data to hive
(cherry picked from commit e0ace535d5f3af71eb13598d92524caf2c6d9bbf)
This commit is contained in:
@@ -3,7 +3,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:core/utils/app_logger.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:model/account/account.dart';
|
||||
import 'package:model/account/personal_account.dart';
|
||||
import 'package:model/account/authentication_type.dart';
|
||||
import 'package:model/oidc/oidc_configuration.dart';
|
||||
import 'package:model/oidc/token.dart';
|
||||
@@ -93,13 +93,13 @@ class AuthorizationInterceptors extends InterceptorsWrapper {
|
||||
await Future.wait([
|
||||
_tokenOidcCacheManager.persistOneTokenOidc(newToken),
|
||||
_accountCacheManager.deleteSelectedAccount(_token!.tokenIdHash),
|
||||
_accountCacheManager.setSelectedAccount(Account(
|
||||
_accountCacheManager.setSelectedAccount(PersonalAccount(
|
||||
newToken.tokenIdHash,
|
||||
AuthenticationType.oidc,
|
||||
isSelected: true,
|
||||
accountId: accountCurrent.accountId,
|
||||
apiUrl: accountCurrent.apiUrl
|
||||
)),
|
||||
apiUrl: accountCurrent.apiUrl,
|
||||
userName: accountCurrent.userName))
|
||||
]);
|
||||
|
||||
log('AuthorizationInterceptors::onError(): refreshToken: $newToken');
|
||||
|
||||
Reference in New Issue
Block a user