Ya había notado este error en Meta, pero luego apareció en mis implementaciones después de la última actualización: al hacer clic en iniciar sesión, aparece la ventana modal “Bienvenido de nuevo ”, y es inmediatamente ensombrecida por “Lo sentimos, ocurrió un error”. Hacer clic en Aceptar elimina la ventana modal de error y puedes reanudar la autenticación normalmente.
Hay un registro de errores en la consola:
ajax-error.js:9:12
l ajax-error.js:9
p ajax-error.js:95
passkeyLogin login.js:147
2 Me gusta
Firefox 115.7.0esr (64 bits) en Debian 12.
Discourse v3.3.0.beta1-dev — Commits · discourse/discourse · GitHub — Ember v5.5.0
1 me gusta
Moin
1 Febrero, 2024 00:41
4
2 Me gusta
Esta es una regresión introducida aquí: FEATURE: Allow users to confirm session with passkeys (#24337) · discourse/discourse@c6ead3f · GitHub
) {
if (!isWebauthnSupported()) {
return errorCallback(I18n.t("login.security_key_support_missing_error"));
}
// we need to check isConditionalMediationAvailable for Firefox
// without it, Firefox will throw console errors
// We cannot do a general check because iOS Safari and Chrome in Selenium quietly support the feature
// but they do not support the PublicKeyCredential.isConditionalMediationAvailable() method
if (mediation === "conditional" && isFirefox) {
const isCMA = await PublicKeyCredential.isConditionalMediationAvailable();
if (!isCMA) {
return;
}
}
try {
const resp = await ajax("/session/passkey/challenge.json");
const credential = await navigator.credentials.get({
publicKey: {
Creo que el código necesita ser movido al try{} de abajo; de lo contrario, el error usará la UI en lugar de la consola.
userHandle: bufferToBase64(credential.response.userHandle),
};
} catch (error) {
if (error.name === "AbortError") {
// no need to show an error when the cancelling a pending ceremony
// this happens when switching from the conditional method (username input autofill)
// to the optional method (login button) or vice versa
return null;
}
if (mediation === "conditional") {
// The conditional method gets triggered in the background
// it's not helpful to show errors for it in the UI
// eslint-disable-next-line no-console
console.error(error);
return null;
}
if (error.name === "NotAllowedError") {
return errorCallback(I18n.t("login.security_key_not_allowed_error"));
} else if (error.name === "SecurityError") {
4 Me gusta
pmusaraj
(Penar Musaraj)
2 Febrero, 2024 21:40
7
Gracias por el informe. Esto debería arreglarse a través de FIX: Handle old Firefox versions that do not support isConditionalMed… by pmusaraj · Pull Request #25549 · discourse/discourse · GitHub , solo pude reproducir con esa versión de Firefox en Windows/macOS, pero la corrección debería aplicarse también a otros sistemas operativos.
3 Me gusta
pmusaraj
(Penar Musaraj)
Cerrado
6 Febrero, 2024 22:41
9
Este tema se cerró automáticamente después de 4 días. Ya no se permiten nuevas respuestas.