From e941ce1d0b21d45b1c5a87e9ca4ad56e1816084b Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Tue, 19 Nov 2024 12:27:19 +0100 Subject: [PATCH] Fix make_credential missing rp.id --- fido2/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fido2/client.py b/fido2/client.py index ded74e1..1b5ebb7 100644 --- a/fido2/client.py +++ b/fido2/client.py @@ -57,6 +57,7 @@ from .rpid import verify_rp_id from .utils import sha256 from enum import IntEnum, unique +from dataclasses import replace from urllib.parse import urlparse from threading import Timer, Event from typing import ( @@ -748,7 +749,7 @@ def _do_make(): return ( self.ctap2.make_credential( client_data_hash, - _as_cbor(rp), + _as_cbor(replace(rp, id=rp_id)), _as_cbor(user), _cbor_list(key_params), [_as_cbor(exclude_cred)] if exclude_cred else None,