Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: chrome/browser/resources/gaia_auth_host/authenticator.js

Issue 1954453002: Skip the SAML confirm password screen when a single password is scraped (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: xiyuan's comment Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/gaia_auth_host/authenticator.js
diff --git a/chrome/browser/resources/gaia_auth_host/authenticator.js b/chrome/browser/resources/gaia_auth_host/authenticator.js
index 4159df30217fb4a29688f9a6a3651a135242e753..c1545baf24d50e1656c1513c0f26a944c12ee5fd 100644
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -650,6 +650,14 @@ cr.define('cr.login', function() {
// password when it is available but not a mandatory requirement.
console.warn('Authenticator: No password scraped for SAML.');
} else if (this.needPassword) {
+ if (this.samlHandler_.scrapedPasswordCount == 1) {
+ // If we scraped exactly one password, we complete the authentication
+ // right away.
+ this.password = this.samlHandler_.firstScrapedPassword;
+ this.onAuthCompleted_();
+ return;
+ }
+
if (this.confirmPasswordCallback) {
// Confirm scraped password. The flow follows in
// verifyConfirmedPassword.
« no previous file with comments | « chrome/browser/chromeos/login/saml/saml_browsertest.cc ('k') | chrome/browser/resources/gaia_auth_host/saml_handler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698