Skip to content

Commit

Permalink
keep old refresh token when access token refreshed and no new refresh…
Browse files Browse the repository at this point in the history
… token received
  • Loading branch information
rbellens committed Feb 22, 2022
1 parent a9f2bb8 commit cbb83e4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.4.6

- keep old refresh token when access token refreshed and no new refresh token received
## 0.4.5

- handle tokens without expiration
Expand Down
3 changes: 2 additions & 1 deletion lib/src/openid.dart
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ class Credential {
},
client: client.httpClient);

_token = TokenResponse.fromJson(json);
_token =
TokenResponse.fromJson({'refresh_token': _token.refreshToken, ...json});
_onTokenChanged.add(_token);
return _token;
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: openid_client
description: Library for working with OpenID Connect and implementing clients.
version: 0.4.5
version: 0.4.6
homepage: https://github.com/appsup-dart/openid_client

environment:
Expand Down

0 comments on commit cbb83e4

Please sign in to comment.