Resident credential:讀懂 WebAuthn 的舊設定名稱
resident credential/key 是 discoverable credential 的舊稱。residentKey 的值表示 RP 的要求。
發布 更新
Resident credential:讀懂 WebAuthn 的舊設定名稱
在目前 WebAuthn 中,resident credential 和 resident key 是 discoverable credential 的歷史舊稱,已不建議使用。API 為相容性保留 residentKey 和 requireResidentKey;它們不是另一種技術。residentKey 表示 RP 的要求:discouraged 優先伺服器端憑證,但接受可探索憑證;preferred 強烈偏好可探索憑證,但接受伺服器端憑證;required 必須建立可探索憑證,否則用戶端會回報錯誤。preferred 不保證結果。requireResidentKey 是舊布林欄位,只有在 residentKey 為 required 時才 SHOULD 設為 true。可探索性與同步、platform/roaming 接入方式和使用者驗證彼此獨立。閱讀舊程式碼時,請檢查實際值、程式庫版本和註冊結果,不要只依 resident 一詞推斷行為。
Sources
[W3C Web Authentication: An API for accessing Public Key Credentials, Level 3, §§4 and 5.4.4–5.4.6](https://www.w3.org/TR/webauthn-3/)