Skip to content

1991 Fixed issue with opening auth fragment #2274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Version 19.0.0
- [PATCH] Translate MFA token error to UIRequiredException instead of ServiceException (#2538)
- [MINOR] Add Child Spans for Interactive Span (#2516)
- [MINOR] For MSAL CPP flows, match exact claims when deleting AT with intersecting scopes (#2548)
- [MINOR] Fix issue with fragment displaying when 'AcquireTokenParameters.Builder().withFragment()' is used (#2274)
- [MINOR] Replace Deprecated Keystore API for Android 28+ (#2558)
- [MINOR] Managed profile Android util method (#2561)
- [PATCH] Make userHandle response field optional (#2560)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected void launchIntent(@NonNull Intent intent) throws ClientException {
final Fragment fragment = mReferencedFragment.get();

if (fragment != null) {
final Fragment authFragment = AuthorizationActivityFactory.getAuthorizationFragmentFromStartIntent(intent);
final Fragment authFragment = getAuthorizationFragment(intent);

final FragmentManager fragmentManager = fragment.getFragmentManager();
if (fragmentManager == null) {
Expand All @@ -98,4 +98,15 @@ protected void launchIntent(@NonNull Intent intent) throws ClientException {
}
activity.startActivity(intent);
}

private static Fragment getAuthorizationFragment(@NonNull Intent intent) {
if (intent.getExtras() != null) {
return AuthorizationActivityFactory.getAuthorizationFragmentFromStartIntentWithState(
intent,
intent.getExtras()
);
}

return AuthorizationActivityFactory.getAuthorizationFragmentFromStartIntent(intent);
}
}