Skip to content

Commit

Permalink
Added backward compatibility for versions prior to rokmetro auth sche…
Browse files Browse the repository at this point in the history
…me (#396).
  • Loading branch information
Mihail Varbanov committed Dec 23, 2020
1 parent 68ca30c commit 24512f5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/service/Auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ class Auth with Service implements NotificationsListener {
_userPiiCacheFile = await _getUserPiiCacheFile();
_userPiiData = await _loadUserPiiDataFromCache();

// Backward compatability
if ((_authToken != null) && (_rokmetroToken == null)) {
_rokmetroToken = await _loadRokmetroToken(optAuthToken: _authToken);
_rokmetroUser = await _loadRokmetroUser(optRokmetroToken: _rokmetroToken);
}

_syncProfilePiiDataIfNeed(); // No need for await
}

Expand Down

0 comments on commit 24512f5

Please sign in to comment.