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

Device code flow fixes when broker is enabled #4846

Merged
merged 10 commits into from
Jul 18, 2024

Conversation

ashok672
Copy link
Contributor

@ashok672 ashok672 commented Jul 17, 2024

Fixes #4786

Changes proposed in this request

  1. WAM does not support device code flow so mark the account with account source to indicate device code flow constructed this account and never go to WAM for subsequent silent token calls. If the user switches to WAM interactive flow for the same account the account cache will be overwritten and subsequent silent token calls will go to WAM
  2. Add Integration test
  3. Add device code flow functionality in test app

Testing
Integration test added.
Also tested manually using the device code flow functionality added to the test app.

Performance impact
Negligible. Just an extra account property to read from and write to the cache.

@ashok672 ashok672 requested a review from a team as a code owner July 17, 2024 20:41
@ashok672 ashok672 changed the title Asram/device code flow fixes when broker is enabled Device code flow fixes when broker is enabled Jul 17, 2024
Copy link
Contributor

@neha-bhargava neha-bhargava left a comment

Choose a reason for hiding this comment

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

Approved with comments and questions

Copy link
Contributor

@fengga fengga left a comment

Choose a reason for hiding this comment

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

I was not in the conversation of how to fix the issue. The code is aligned with the description "WAM does not support device code flow so mark the account with account source to indicate device code flow constructed this account and never go to WAM for subsequent silent token calls", LGTM.

@ashok672 ashok672 merged commit 574f2e6 into main Jul 18, 2024
6 checks passed
@ashok672 ashok672 deleted the asram/device-code-flow-fixes-when-broker-is-enabled branch July 18, 2024 21:26
/// The initial flow that established the account. For example, device code flow.
/// </summary>
/// <remarks>Can be null. Currently only device code flow updates this property with a valid string</remarks>
string AccountSource { get; }
Copy link
Member

@bgavrilMS bgavrilMS Jul 18, 2024

Choose a reason for hiding this comment

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

This is a breaking change. You can't add properties to an interface. Please do not ship this.

Copy link
Member

Choose a reason for hiding this comment

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

IMO this should not be added to the public API.

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