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

Wrong credentialId returned from /signin/verify endpoint #730

Open
aliaftab612 opened this issue Sep 12, 2024 · 3 comments
Open

Wrong credentialId returned from /signin/verify endpoint #730

aliaftab612 opened this issue Sep 12, 2024 · 3 comments

Comments

@aliaftab612
Copy link

The /signin/verify endpoint is returning an incorrect credentialId. When hitting this endpoint with a token to verify passkey sign-in, the response contains a credentialId that does not match the expected value.

In the Admin console, the credentialId for the passkey is: gC-5YbmlbT2S9qv4uv1aIw, which I assume is correct. However, when I try to verify the sign-in, the response returns this credentialId: gC+5YbmlbT2S9qv4uv1aIw==, which differs from the one in the Admin console.

Below I have shared images for reference:

Screenshot 2024-09-12 at 3 35 59 PM

Screenshot 2024-09-12 at 3 36 14 PM

@abergs
Copy link
Member

abergs commented Sep 17, 2024

Hey @aliaftab612, I'm going to check if there's an actual issue, but just looking at this I think it's just encoded with/without base64url in the AdminConsole UI.

@aliaftab612
Copy link
Author

aliaftab612 commented Sep 17, 2024

Hey @aliaftab612, I'm going to check if there's an actual issue, but just looking at this I think it's just encoded with/without base64url in the AdminConsole UI.

@abergs It appears that, except for this endpoint, all other endpoints return the Base64url-encoded credentialId. For example, in the credentials/delete endpoint, the encoded credentialId is used for deletion, and in credentials/list, the encoded credentialId is returned. Other endpoints related to sign and registration, also work with the encoded credentialId. This specific endpoint returns the credentialId without encoding, causing my application to fail when performing checks with the credentialId returned after verification. I believe the credentialId encoding should be consistent across all endpoints.

@jonashendrickx
Copy link
Member

jonashendrickx commented Sep 18, 2024

@abergs It looks like we don't use the Base64UrlConverter, I'm only seeing [MessagePack] attributes for the properties. So it's serializing to Base64 by default instead.

GET /credentials/list and other endpoints do Base64Url encode all byte arrays.

public byte[] CredentialId { get; set; }

We probably have to fix it, but it would be a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants