Skip to content
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

1991 Fixed issue with opening auth fragment #2274

Open
wants to merge 4 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
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ vNext
- [MINOR] Add Child Spans for Interactive Span (#2516)
- [MINOR] For MSAL CPP flows, match exact claims when deleting AT with intersecting scopes (#2548)
- [MINOR] Replace Deprecated Keystore API for Android 28+ (#2558)

- [MINOR] Fix issue with fragment displaying when 'AcquireTokenParameters.Builder().withFragment()' is used (#2274)
- [MINOR] Managed profile Android util method (#2561)
- [PATCH] Make userHandle response field optional (#2560)
- [MINOR] Nonce redirect changes (#2552)
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);
}
}