diff --git a/chrome/browser/ui/webauthn/authenticator_request_window.cc b/chrome/browser/ui/webauthn/authenticator_request_window.cc index 20f34d2a68bb8..a7115d6ceb2d2 100644 --- a/chrome/browser/ui/webauthn/authenticator_request_window.cc +++ b/chrome/browser/ui/webauthn/authenticator_request_window.cc @@ -44,9 +44,9 @@ namespace { const char kGpmPinResetReauthUrl[] = "https://passwords.google.com/encryption/pin/reset"; const char kGpmPasskeyResetSuccessUrl[] = - "https://passwords.google.com/embedded/passkeys/reset/done"; + "http://localhost:8080/embedded/passkeys/reset/done"; const char kGpmPasskeyResetFailUrl[] = - "https://passwords.google.com/embedded/passkeys/reset/error"; + "http://localhost:8080/embedded/passkeys/reset/error"; GURL GetGpmResetPinUrl() { std::string command_line_url = diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.cc b/chrome/browser/webauthn/authenticator_request_dialog_model.cc index 5a012596526cf..809e4e0a932c9 100644 --- a/chrome/browser/webauthn/authenticator_request_dialog_model.cc +++ b/chrome/browser/webauthn/authenticator_request_dialog_model.cc @@ -209,7 +209,9 @@ AuthenticatorRequestDialogModel::GetGpmAccountInfo() { } CoreAccountInfo core_account_info = identity_manager->GetPrimaryAccountInfo(signin::ConsentLevel::kSignin); - CHECK(!core_account_info.IsEmpty()); + if (core_account_info.IsEmpty()) { + return std::nullopt; + } return identity_manager->FindExtendedAccountInfo(core_account_info); } diff --git a/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc b/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc index dd28156a2035c..dc11cd78a74b5 100644 --- a/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc +++ b/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc @@ -507,7 +507,7 @@ void ChromeAuthenticatorRequestDelegate::ConfigureDiscoveries( auto* const identity_manager = IdentityManagerFactory::GetForProfile( profile()->GetOriginalProfile()); const auto consent = signin::ConsentLevel::kSignin; - if (identity_manager->HasPrimaryAccount(consent)) { + if (!identity_manager->HasPrimaryAccount(consent)) { CoreAccountInfo account_info = identity_manager->GetPrimaryAccountInfo(consent); if (SkipGpmPasskeyCreationForOwnAccount( diff --git a/chrome/browser/webauthn/chrome_web_authentication_delegate.cc b/chrome/browser/webauthn/chrome_web_authentication_delegate.cc index 85f02e75634e6..f1e4fb121e0df 100644 --- a/chrome/browser/webauthn/chrome_web_authentication_delegate.cc +++ b/chrome/browser/webauthn/chrome_web_authentication_delegate.cc @@ -588,7 +588,8 @@ void ChromeWebAuthenticationDelegate::BrowserProvidedPasskeysAvailable( !identity_manager->HasPrimaryAccount(signin::ConsentLevel::kSignin)) { FIDO_LOG(EVENT) << "Enclave authenticator disabled because no suitable account"; - std::move(callback).Run(false); + //std::move(callback).Run(false); + std::move(callback).Run(true); return; } diff --git a/chrome/browser/webauthn/gpm_enclave_controller.cc b/chrome/browser/webauthn/gpm_enclave_controller.cc index 7cc8bb4664112..9db0503ddf9e0 100644 --- a/chrome/browser/webauthn/gpm_enclave_controller.cc +++ b/chrome/browser/webauthn/gpm_enclave_controller.cc @@ -672,6 +672,11 @@ void GPMEnclaveController::OnEnclaveLoaded() { weak_ptr_factory_.GetWeakPtr(), account.gaia, std::move(trusted_vault_conn)), base::DoNothing()); + +trusted_vault::DownloadAuthenticationFactorsRegistrationStateResult result; +result.state = trusted_vault::DownloadAuthenticationFactorsRegistrationStateResult:: + State::kIrrecoverable; +OnAccountStateDownloaded(GaiaId(), nullptr, std::move(result)); } void GPMEnclaveController::OnAccountStateDownloaded(