Notei este bug antes no Meta, mas depois ele apareceu em minhas implantações após a atualização mais recente: ao clicar em login, a modal “Bem-vindo de volta ” aparece e é imediatamente obscurecida por “Desculpe, ocorreu um erro”. Clicar em OK remove a modal de erro e você pode continuar a autenticação normalmente.
Há um log de erro no console:
ajax-error.js:9:12
l ajax-error.js:9
p ajax-error.js:95
passkeyLogin login.js:147
2 curtidas
Firefox 115.7.0esr (64 bits) no Debian 12.
Discourse v3.3.0.beta1-dev — Commits · discourse/discourse · GitHub — Ember v5.5.0
1 curtida
Moin
Fevereiro 1, 2024, 12:41am
4
2 curtidas
Esta é uma regressão introduzida aqui: 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: {
Acho que o código precisa ser movido para o try{} abaixo; caso contrário, o erro usará a interface do usuário em vez do console.
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 curtidas
pmusaraj
(Penar Musaraj)
Fevereiro 2, 2024, 9:40pm
7
Obrigado pelo relatório. Isso deve ser corrigido via FIX: Handle old Firefox versions that do not support isConditionalMed… by pmusaraj · Pull Request #25549 · discourse/discourse · GitHub , eu só consegui reproduzir com essa versão do Firefox no Windows/macOS, mas a correção deve se aplicar a outros sistemas operacionais também.
3 curtidas
pmusaraj
(Penar Musaraj)
Fechado
Fevereiro 6, 2024, 10:41pm
9
Este tópico foi fechado automaticamente após 4 dias. Novas respostas não são mais permitidas.