Closed JRiggles closed 9 months ago
As it turns out, the issue was with my database's credentialId
column. I had set it to a width of 64, which was truncating the base-64 encoded value and breaking things. Setting the width to 1024 (as indicated in Database Entity Relationship here) fixed the issue!
Using the example PHP as a template, I'm trying to move from
$_SESSION
-based storage to a MySQL database.I've created DB entries for
userId
,credentialId
,credentialPublicKey
, andsignatureCounter
, but I can't figure out how to then use that information to validate my security key (a Yubikey, in my case) after creating the registration.Here's an example of my working database entry creation code (
$dbh
here is my database connection):And here is how I get the values for
userId
,credentialId
,credentialPublicKey
, andsignatureCounter
to pass into mycreateRegistration
function (largely taken from the example code, as well as this issue):This does create the appropriate database entry, but I cannot figure out how to use this information to then authenticate the "registered" user with their security key. Any help is appreciated - let me know if there's anything I can clarify.