日志中的错误:
NoMethodError (undefined method
hash_function' for an instance of COSE::Algorithm::EdDSA) lib/discourse_webauthn/authentication_service.rb:99:inauthenticate_security_key’
COSE 算法 Pure EdDSA 没有哈希函数,因此会出现此错误。cose_ruby 自 2022 年 10 月起确实支持 EdDSA。有关使用 EdDSA 的详细信息,请参阅 此处。
我认为正确处理此算法的方法是按照建议,在不带哈希的情况下调用 verify。