Commit 4d4971eb authored by Kush Sinha's avatar Kush Sinha Committed by Commit Bot

crOS: Display a reauth dialog for Mirror reauthentication

On Chrome OS, with Mirror account reconciliation enabled, it is possible
that an account's session expires server-side without Chrome detecting
it. In these cases, Gaia sends us a re-authentication header message
with the account's email that needs re-authentication.

Currently, Chrome OS displays the Account Manager Settings page for
these messages. Fix it to show a re-authentication dialog.

Bug: b/136640443
Change-Id: I9a88a3115908a663ac0b9f895656782ff0fb8923
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1695351Reviewed-by: default avatarBoris Sazonov <bsazonov@chromium.org>
Commit-Queue: Kush Sinha <sinhak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676093}
parent 2020d98f
......@@ -59,6 +59,7 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/ui/settings_window_manager_chromeos.h"
#include "chrome/browser/ui/webui/signin/inline_login_handler_dialog_chromeos.h"
#include "chromeos/constants/chromeos_switches.h"
#endif
......@@ -210,14 +211,26 @@ void ProcessMirrorHeaderUIThread(
//
// - Going Incognito (already handled in above switch-case).
// - Displaying the Account Manager for managing accounts.
// - Displaying a reauthentication window: Enterprise GSuite Accounts could
// have been forced through an online in-browser sign-in for sensitive
// webpages, thereby decreasing their session validity. After their session
// expires, they will receive a "Mirror" re-authentication request for all
// Google web properties.
// Do not display Account Manager if the navigation happened in the
// "background".
if (!chrome::FindBrowserWithWebContents(web_contents))
return;
chrome::SettingsWindowManager::GetInstance()->ShowOSSettings(
profile, chrome::kAccountManagerSubPage);
if (manage_accounts_params.email.empty()) {
// Display Account Manager for managing accounts.
chrome::SettingsWindowManager::GetInstance()->ShowOSSettings(
profile, chrome::kAccountManagerSubPage);
} else {
// Display a re-authentication dialog.
chromeos::InlineLoginHandlerDialogChromeOS::Show(
manage_accounts_params.email);
}
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment