# Impossibile configurare la passkey su alcun discourse

**URL:** https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642
**Category:** Bug
**Tags:** passkey, fixed
**Created:** [4 Marzo 2026, 6:14pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642 "2026-03-04T18:14:26Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![agr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/agr/32/544572_2.png) [@agr](https://meta.discourse.org/u/agr)
#### Post date: [4 Marzo 2026, 6:14pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/1 "2026-03-04T18:14:26Z")

</div>

Quando utilizzo hardware che non possiedo, voglio usare una chiave hardware invece di inserire la mia password. Ho acquistato una Nitrokey 3C per questo scopo.

La registrazione su Discourse fallisce. Anche qui su [meta.discourse.org](http://meta.discourse.org).

p.s. La registrazione della chiave come secondo fattore ha funzionato su Linux (Debian) + Chromium, ma non quando provo ad accedere.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [4 Marzo 2026, 7:16pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/2 "2026-03-04T19:16:32Z")

</div>

> [@agr](#):
>
> La registrazione su Discourse fallisce

Che browser stai usando?

Qual è l’errore che ricevi?

Ci sono dettagli aggiuntivi nella console per sviluppatori?

---

<div class="post-metadata">

### Author: ![agr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/agr/32/544572_2.png) [@agr](https://meta.discourse.org/u/agr)
#### Post date: [4 Marzo 2026, 8:04pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/3 "2026-03-04T20:04:28Z")

</div>

questo è su Debian Chromium (e su Ubuntu Firefox lo stesso; anche lo stesso su Firefox Nightly (snap) su Debian)

Dopo aver premuto il pulsante sulla chiave

‘Il processo di registrazione della passkey è scaduto, è stato annullato o non è consentito.’

L’errore non è utile; niente di speciale nella console.

La richiesta a [https://meta.discourse.org/u/register\_passkey.json](https://meta.discourse.org/u/register_passkey.json) restituisce http 500 con payload `{"status":500,"error":"Internal Server Error"}`.

I dati della richiesta sarebbero utili?

> id=owBYLgKCahnu\_YBKKDAaTdK7LOlDFzwJ9kJPvXfntmdfbyOzs35ddeOM0KnNqHiu6bwBTLu17fF2A7QkNfCE5wJQPdOrG5MIB-9Hek6KoX4wcA  
> rawId=owBYLgKCahnu/YBKKDAaTdK7LOlDFzwJ9kJPvXfntmdfbyOzs35ddeOM0KnNqHiu6bwBTLu17fF2A7QkNfCE5wJQPdOrG5MIB+9Hek6KoX4wcA==  
> type=public-key  
> attestation=o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YVjB06zu7aykTbz9dy22doBbDg8EboPkWBAWR4JLQn8z1TTFAAAAewAAAAAAAAAAAAAAAAAAAAAAUqMAWC4CgmoZ7v2ASigwGk3SuyzpQxc8CfZCT71357ZnX28js7N+XXXjjNCpzah4rum8AUy7te3xdgO0JDXwhOcCUD3TqxuTCAfvR3pOiqF+MHCkAQEDJyAGIVggy/MDuHan5fRjuKIQp7zkGku7P6p/8s2B4kfectFHcF6ha2htYWMtc2VjcmV09A==  
> clientData=eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiTmpRMVpUazJaVE00WlRRNE1UZGxOamd3TVdJNE5XVm1ZV1F5TkRObE1EVmlZek0zTURkbU1qZzJPR1V6TnpRd05HUmxZamRrTVdRMk1tWTEiLCJvcmlnaW4iOiJodHRwczovL21ldGEuZGlzY291cnNlLm9yZyIsImNyb3NzT3JpZ2luIjpmYWxzZX0=  
> name=Main Passkey

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [4 Marzo 2026, 9:19pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/4 "2026-03-04T21:19:05Z")

</div>

Funziona su [https://webauthn.io/](https://webauthn.io/) ?

---

<div class="post-metadata">

### Author: ![agr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/agr/32/544572_2.png) [@agr](https://meta.discourse.org/u/agr)
#### Post date: [4 Marzo 2026, 9:28pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/6 "2026-03-04T21:28:29Z")

</div>

sì, registrazione e autenticazione

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [4 Marzo 2026, 9:33pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/7 "2026-03-04T21:33:41Z")

</div>

Ho appena provato a registrare una nuova chiave U2F qui su meta e vedo questo errore nella console che probabilmente lo spiega:

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/3/f/93fba79e45ab82e3f6cf71122be34fc523b0f7bc.png)

```plaintext
NotAllowedError: L'operazione è scaduta o non è stata consentita.
  Vedi: https://www.w3.org/TR/webauthn-2/#sctn-privacy-considerations-client.

```

---

<div class="post-metadata">

### Author: ![agr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/agr/32/544572_2.png) [@agr](https://meta.discourse.org/u/agr)
#### Post date: [4 Marzo 2026, 9:56pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/9 "2026-03-04T21:56:11Z")

</div>

Non capisco la descrizione dell’errore su [w3.org](http://w3.org); quindi l’implementazione è rotta? Non sembra che l’errore compaia nella console, quindi c’è qualcosa che posso contribuire a sistemare?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [4 Marzo 2026, 9:57pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/10 "2026-03-04T21:57:51Z")

</div>

Dovremo esaminare questo: penso che i browser abbiano implementato requisiti aggiuntivi (come notato nel link) da quando abbiamo sviluppato questo per la prima volta.

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [5 Marzo 2026, 5:53pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/18 "2026-03-05T17:53:35Z")

</div>

Grazie @agr per aver identificato questo problema, ho rilasciato una correzione qui:

> <https://github.com/discourse/discourse/pull/38266>
>
> \*\*Currently, passkey registration has two bugs:\*\*
> 1. Registration fails with …an HTTP 500 for authenticators that include extension data (i.e. \`hmac-secret\` in their attestation response) because we slice all bytes after the credential ID the public key.
> 2. Registration fails with \`NotAllowedError\` on some hardware keys (i.e. Solo 2) because \`pubKeyCredParams\` includes invalid HMAC symmetric algorithms from the \`COSE\` gem, which strict authenticator firmware rejects.
> 
> \*\*This fix:\*\*
> 1. Uses \`CBOR::Unpacker\` streaming decode to read exactly one \`CBOR\` object from the byte stream, stopping before any trailing extension data. Also adds \`COSE::MalformedKeyError\` to the rescue block so future failures return a proper error response.
> 2. Replaces the blanket \`COSE::Algorithm.registered\_algorithm\_ids\` with an explicit list of asymmetric signature algorithms valid for \`WebAuthn\`.
> 
> Meta bug report: https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/

L’aggiornamento di Discourse alla versione più recente dovrebbe ora risolvere il problema, ma se riscontri ancora problemi, faccelo sapere.

---

<div class="post-metadata">

### Author: ![agr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/agr/32/544572_2.png) [@agr](https://meta.discourse.org/u/agr)
#### Post date: [5 Marzo 2026, 8:08pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/20 "2026-03-05T20:08:14Z")

</div>

La registrazione ha funzionato bene. È stato veloce 🙂

Ma login / auth.js mi restituisce una risposta 500

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [5 Marzo 2026, 9:55pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/21 "2026-03-05T21:55:10Z")

</div>

Confermato; vedo:

```plaintext
NoMethodError (metodo non definito 'hash_function' per un'istanza di COSE::Algorithm::EdDSA)
 lib/discourse_webauthn/authentication_service.rb:99:in 'DiscourseWebauthn::AuthenticationService#authenticate_security_key'
 app/controllers/session_controller.rb:399:in 'SessionController#passkey_login'
 app/controllers/application_controller.rb:443:in 'block in ApplicationController#with_resolved_locale'
 app/controllers/application_controller.rb:443:in 'ApplicationController#with_resolved_locale'
 app/controllers/application_controller.rb:1089:in 'ApplicationController#ensure_dont_cache_page'
 lib/middleware/omniauth_bypass_middleware.rb:35:in 'Middleware::OmniauthBypassMiddleware#call'
 lib/middleware/crawler_hooks.rb:11:in 'Middleware::CrawlerHooks#call'
 lib/content_security_policy/middleware.rb:12:in 'ContentSecurityPolicy::Middleware#call'
 lib/middleware/anonymous_cache.rb:420:in 'Middleware::AnonymousCache#call'
 lib/middleware/csp_script_nonce_injector.rb:12:in 'Middleware::CspScriptNonceInjector#call'
 config/initializers/008-rack-cors.rb:26:in 'Discourse::Cors#call'
 lib/middleware/default_headers.rb:13:in 'Middleware::DefaultHeaders#call'
 config/initializers/100-quiet_logger.rb:20:in 'DiscourseRackQuietAssetsLogger#call'
 config/initializers/100-silence_logger.rb:29:in 'SilenceLogger#call'
 lib/middleware/enforce_hostname.rb:23:in 'Middleware::EnforceHostname#call'
 lib/middleware/request_tracker.rb:321:in 'Middleware::RequestTracker#call'
 lib/middleware/overload_protections.rb:22:in 'Middleware::OverloadProtections#call'
 lib/middleware/processing_request.rb:14:in 'Middleware::ProcessingRequest#call'

```

nei log quando provo a usare la mia Solo 2

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [6 Marzo 2026, 9:53pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/25 "2026-03-06T21:53:07Z")

</div>

Grazie per aver controllato, @agr, ho appena caricato un’altra correzione:

> <https://github.com/discourse/discourse/pull/38328>
>
> \*\*Previously\*\*, passkey authentication called \`cose\_algorithm.hash\_function\` to …verify signatures, but \`COSE::Algorithm::EdDSA\` does not implement \`hash\_function\` (EdDSA has the hash built into the algorithm). This caused a \`NoMethodError 500\` for any user who registered a passkey with an EdDSA-based authenticator.
> 
> \*\*This commit\*\* uses the COSE gem's own \`cose\_algorithm.verify\` method, which correctly dispatches signature verification for all algorithm types — including EdDSA, which passes nil as the digest internally.

Speriamo non ci siano più problemi 🤞, ma per favore fatemi sapere se riscontrate ancora problemi!

---

<div class="post-metadata">

### Author: ![agr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/agr/32/544572_2.png) [@agr](https://meta.discourse.org/u/agr)
#### Post date: [7 Marzo 2026, 11:49am UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/26 "2026-03-07T11:49:27Z")

</div>

Grazie per la rapida correzione. Ho anche provato a usare Nitrokey per l’autenticazione a due fattori (2FA) e ha funzionato sia per la registrazione che per l’accesso. Davvero ottimo!!

---

<div class="post-metadata">

### Author: ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)
#### Post date: [16 Marzo 2026, 3:00pm UTC](https://meta.discourse.org/t/cant-set-up-passkey-on-any-discourse/397642/28 "2026-03-16T15:00:09Z")

</div>

Questo argomento è stato chiuso automaticamente dopo 9 giorni. Non sono più consentite nuove risposte.
