Skip to content

Commit

Permalink
[iOS] Don't trigger reauth during device restore
Browse files Browse the repository at this point in the history
Reauth prompt sign-in should not set when a device restore is detected.

(cherry picked from commit 8a45922)

Fixed: 1471875
Change-Id: I3f476fce4d68359492b7506342baceadd27574de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4771755
Reviewed-by: Scott Yoder <scottyoder@google.com>
Auto-Submit: Jérôme Lebel <jlebel@chromium.org>
Commit-Queue: Scott Yoder <scottyoder@google.com>
Cr-Original-Commit-Position: refs/heads/main@{#1182547}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4783427
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Reviewed-by: Menghan Yang <myuu@google.com>
Commit-Queue: Menghan Yang <myuu@google.com>
Cr-Commit-Position: refs/branch-heads/5938@{#188}
Cr-Branched-From: 2b50cb4-refs/heads/main@{#1181205}
  • Loading branch information
Jérôme Lebel authored and Chromium LUCI CQ committed Aug 16, 2023
1 parent 58e5ffd commit 4158ced
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ios/chrome/browser/signin/authentication_service.mm
Expand Up @@ -678,7 +678,10 @@ CoreAccountId SystemIdentityToAccountID(

if (should_prompt && account_filtered_out) {
FirePrimaryAccountRestricted();
} else if (should_prompt) {
} else if (should_prompt &&
IsFirstSessionAfterDeviceRestore() != signin::Tribool::kTrue) {
// If the device is restored, the restore shorty UI will be shown.
// Therefore, the reauth UI should be skipped.
SetReauthPromptForSignInAndSync();
}
}
Expand Down

0 comments on commit 4158ced

Please sign in to comment.