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

Consider incorporating 'synced' status in verifyAuthentication() #69

Closed
hjaber opened this issue Aug 4, 2024 · 2 comments
Closed

Consider incorporating 'synced' status in verifyAuthentication() #69

hjaber opened this issue Aug 4, 2024 · 2 comments

Comments

@hjaber
Copy link
Contributor

hjaber commented Aug 4, 2024

Currently, the verifyAuthentication() function doesn't take into account whether a credential is synced or not.

Unsure of the intention but we potentially don't need to save it during registration if it will not be used during authentication.

//authentication docs
const credentialKey = { // obtained from database by looking up `authentication.id`
    id: "3924HhJdJMy_svnUowT8eoXrOOO6NLP8SK85q2RPxdU",
    publicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgyYqQmUAmDn9J7dR5xl-HlyAA0R2XV5sgQRnSGXbLt_xCrEdD1IVvvkyTmRD16y9p3C2O4PTZ0OF_ZYD2JgTVA==",
    algorithm: "ES256",
    synced: true
} as const
export interface CredentialInfo {
    id: string;
    publicKey: string;
    algorithm: NamedAlgo;
    transports: ExtendedAuthenticatorTransport[];
    //synced?: boolean // add this type?
}
@dagnelies
Copy link
Collaborator

dagnelies commented Aug 5, 2024

The synced is not an attribute to verify. It's rather an information that influences recovery procedures in case of device loss.

@dagnelies
Copy link
Collaborator

dagnelies commented Aug 5, 2024

I also think the doc still has a glitch. I think I moved up the synced attribute in the parent object. In doubt, always check the playground.

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

2 participants