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

DUNA flow: Resume Auth , Fixes AB#3079802 #2557

Open
wants to merge 83 commits into
base: dev
Choose a base branch
from

Conversation

p3dr0rv
Copy link
Contributor

@p3dr0rv p3dr0rv commented Dec 11, 2024

This PR addresses step 16 of the Switch browser flow

  • BrokerBrowserRedirectActivity will re-start the WebViewAuthorizationFragment so we update the intent data and handle the activity being resumed on WebViewAuthorizationFragment.onResume

  • The switch browser resume endpoint requires the client ID, so we need to pass this value at the moment we start the WebAuthorizaFragment.

  • Refactor AuthorizationActivityFactory to work with one data parameter to create the auth intent.

AB#3079802

Copy link

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

@p3dr0rv p3dr0rv changed the title [WIP] Back to WebView DUNA flow: Resume Auth Dec 12, 2024
@p3dr0rv p3dr0rv marked this pull request as ready for review December 12, 2024 18:57
@p3dr0rv p3dr0rv requested a review from a team as a code owner December 12, 2024 18:57
Base automatically changed from pedroro/switch-to-browser to dev February 22, 2025 01:45
Copy link

✅ Work item link check complete. Description contains link AB#3079802 to an Azure Boards work item.

Copy link

❌ Work item link check failed. Description contains AB#3079802
but the Bot could not link it to an Azure Boards work item.

Click here to learn more.

@github-actions github-actions bot changed the title DUNA flow: Resume Auth DUNA flow: Resume Auth , Fixes AB#3079802 Feb 23, 2025
@p3dr0rv p3dr0rv marked this pull request as ready for review February 23, 2025 22:52
final boolean containsCode = extras.containsKey(
AuthenticationConstants.SWITCH_BROWSER.CODE
);
return containsCode && containsActionUri;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also check if the existing state of the authorization is it is waiting for resuming switch browser flow? You may want store some state what you can validate here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 6f82f9d

/**
* String Query parameter key to indicate support for SWITCH_BROWSER protocol.
*/
public static final String PATH = "switch_browser";
public static final String CLAIM = "switch_browser";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this called CLAIM now?

Copy link
Contributor Author

@p3dr0rv p3dr0rv Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous constant called PATH was renamed to START_PATH (switch_browser) to differentiate it from RESUME_PATH (switch_browser_resume). The claim is the QP that indicates the client supports DUNA. Actually, I will rename it to CLIENT_SUPPORTS_FLOW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants