This commit is contained in:
Hillel Coren 2018-09-27 11:12:01 +03:00
parent 9759eaf52b
commit 12a82d21db
1 changed files with 6 additions and 3 deletions

View File

@ -29,9 +29,12 @@ List<Middleware<AppState>> createStoreAuthMiddleware([
void _saveAuthLocal(dynamic action) async {
await FlutterKeychain.put(key: kKeychainEmail, value: action.email);
await FlutterKeychain.put(
key: kKeychainUrl, value: formatApiUrlMachine(action.url));
await FlutterKeychain.put(key: kKeychainSecret, value: action.secret);
if (formatApiUrlReadable(action.url) != kAppUrl) {
await FlutterKeychain.put(
key: kKeychainUrl, value: formatApiUrlMachine(action.url));
await FlutterKeychain.put(key: kKeychainSecret, value: action.secret);
}
}
void _loadAuthLocal(Store<AppState> store, dynamic action) async {