Skip to content

Commit

Permalink
added logic to recreate AuthorizationService objects if disposed but …
Browse files Browse the repository at this point in the history
…were needed
  • Loading branch information
MaikuB committed Oct 13, 2024
1 parent 96c801f commit 1491b2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions flutter_appauth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [8.0.0-dev.4]

* [Android] no functional changes but some code around dealing with `allowInsecureConnections` has been done in response to issue [554](https://github.com/MaikuB/flutter_appauth/issues/554)
* [Android] added logic to help with issues like [205](https://github.com/MaikuB/flutter_appauth/issues/205) where an app tries to refresh a token but the instances of `AuthorizationService` have been disposed

## [8.0.0-dev.3]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,10 @@ private void performEndSessionRequest(
}

private AuthorizationService getAuthorizationService() {
if (insecureAuthorizationService == null || defaultAuthorizationService == null) {
// There have been some reported instances where the services have been disposed but they're still needed e.g. to refresh token
createAuthorizationServices();
}
AuthorizationService authorizationService =
allowInsecureConnections ? insecureAuthorizationService : defaultAuthorizationService;
return authorizationService;
Expand Down

0 comments on commit 1491b2b

Please sign in to comment.