Skip to content

Commit

Permalink
Merge pull request #462 from rokwire/feature/issue-396
Browse files Browse the repository at this point in the history
Refresh auth token before refreshing rokmetro token (#396).
  • Loading branch information
Mihail Varbanov committed Dec 30, 2020
2 parents 52ba78b + 15a981e commit 4e7aa6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/service/Auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,8 @@ class Auth with Service implements NotificationsListener {
}

Future<AuthToken> refreshRokmetroToken() async {
RokmetroToken newRokmetroToken = await _loadRokmetroToken(optAuthToken: _authToken);
AuthToken newAuthToken = await refreshAuthToken();
RokmetroToken newRokmetroToken = await _loadRokmetroToken(optAuthToken: newAuthToken);
if (newRokmetroToken?.idToken != null) {
Storage().rokmetroToken = _rokmetroToken = newRokmetroToken;
}
Expand Down

0 comments on commit 4e7aa6f

Please sign in to comment.