[FedCM] Show account chooser for non-returning user on approved client #46707
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently on button mode, for this particular case of a logged out
user signing in as a non-returning user on an RP which is in the list
of approved clients, we would show disclosure UI without the
disclosure text. This patch makes it such that we show the account
chooser instead because the disclosure UI without the disclosure text
is unnecessary new UI surface which doesn't convey any additional
information compared to the account chooser.
Note that we show the multi account picker instead of the single account
picker. This is because when we were showing disclosure UI, the user was
able to go back and retrieve the original list of accounts by clicking
the "Back" button. However, the "back" button is not available on the
account pickers. We prefer a multi account picker compared to having an
additional UI surface. The most recently signed in accounts are shown
at the top of the multi account picker.
This patch also refactors the state machine. We used to set the state_
to State::REQUEST_PERMISSION for single account pickers on the bubble
but that is confusing. This patch changes it to have state_ be
State::SINGLE_ACCOUNT_PICKER.
Bug: 342557704
Change-Id: I9435ee5a34cf47567c6a4a16bbffd99ba8eee798
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5578254
Reviewed-by: Yi Gu <yigu@chromium.org>
Commit-Queue: Zachary Tan <tanzachary@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1313829}