Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public Key and Certificate Always Different #39

Open
madzae opened this issue Jul 29, 2021 · 1 comment
Open

Public Key and Certificate Always Different #39

madzae opened this issue Jul 29, 2021 · 1 comment
Labels
question Further information is requested

Comments

@madzae
Copy link

madzae commented Jul 29, 2021

Hey,

With example code, I can generate credentialId, credentialPublicKey, and certificate from PHP Session ($_SESSION['registrations']) and save that data to MySQL database. But, everytime the user logout and login again, the credentialId, credentialPublicKey, and certificate not the same as the previous ones.

This sample code from my project to get the data from PHP Session.

<?php

foreach ($_SESSION['registrations'] as $obj)
{
   
    echo $obj->credentialPublicKey;
    echo "<br>";
    echo $obj->certificate;
    echo "<br>";
    echo $obj->credentialId;

}

My question is, how to authenticate user with that data?

@lbuchs
Copy link
Owner

lbuchs commented Aug 2, 2021

you should only generate one registration, it's not possible to compare different registrations. For verification, there is another function. check out workflow and sample code at https://github.com/lbuchs/WebAuthn/blob/master/_test/server.php.

@lbuchs lbuchs added the question Further information is requested label Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants