Skip to content

Commit

Permalink
Merge pull request #84 from Bdaya-Dev/fix/logout-options
Browse files Browse the repository at this point in the history
fix: logout options not being used
  • Loading branch information
ahmednfwela authored Jun 8, 2024
2 parents bdee646 + 29b1d04 commit 28ea1ad
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/oidc_core/lib/src/managers/user_manager_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ abstract class OidcUserManagerBase {
required OidcMonitorSessionStatusRequest request,
});

@protected
OidcPlatformSpecificOptions getPlatformOptions([
OidcPlatformSpecificOptions? optionsOverride,
]) {
return optionsOverride ??
settings.options ??
const OidcPlatformSpecificOptions();
}

/// Attempts to login the user via the AuthorizationCodeFlow.
///
/// [originalUri] is the uri you want to be redirected to after authentication is done,
Expand All @@ -163,7 +172,7 @@ abstract class OidcUserManagerBase {
ensureInit();
final discoveryDocument =
discoveryDocumentOverride ?? this.discoveryDocument;
options ??= settings.options ?? const OidcPlatformSpecificOptions();
options = getPlatformOptions(options);
final simpleReq = OidcSimpleAuthorizationCodeFlowRequest(
clientId: clientCredentials.clientId,
originalUri: originalUri,
Expand Down Expand Up @@ -377,7 +386,7 @@ abstract class OidcUserManagerBase {
ensureInit();
final discoveryDocument =
discoveryDocumentOverride ?? this.discoveryDocument;
options ??= const OidcPlatformSpecificOptions();
options = getPlatformOptions(options);
final currentUser = this.currentUser;
if (currentUser == null) {
return;
Expand Down

0 comments on commit 28ea1ad

Please sign in to comment.