Hey I'm Raymond from Kenya. I luckily got to see your blog post on how you were able to come up with a back-end implementation of WebAuthn for NodeJs. Thanks for embracing open source by sharing your efforts with other developers.
I've added the option for specifying the authenticator from the back-end since my use-case involves using WebAuthn for smartphones with bio-metric recognition features such as a 'Fingerprint Sensor'. I've given the parameter a default value ('cross-platform') to prevent breaking changes. I've also added a validator to make sure values passed for authenticator and attestation are valid, if not, they are set to their corresponding defaults.
Example Usage:
// api.js
app.post('/request-register', (req, res) => {
const { id, email } = req.body;
const challengeResponse = generateRegistrationChallenge({
relyingParty: { name: 'ACME' },
user: { id, name: email },
authenticator: 'platform' // Here is where you choose the authenticator
});
userRepository.create({
id,
email,
challenge: challengeResponse.challenge,
})
res.send(challengeResponse);
});
Yours Sincerely,
Raymond Nyaga (rayauxey@gmail.com)
Hey I'm Raymond from Kenya. I luckily got to see your blog post on how you were able to come up with a back-end implementation of WebAuthn for NodeJs. Thanks for embracing open source by sharing your efforts with other developers.
I've added the option for specifying the authenticator from the back-end since my use-case involves using WebAuthn for smartphones with bio-metric recognition features such as a 'Fingerprint Sensor'. I've given the parameter a default value
('cross-platform')
to prevent breaking changes. I've also added a validator to make sure values passed forauthenticator
andattestation
are valid, if not, they are set to their corresponding defaults.Example Usage:
Yours Sincerely, Raymond Nyaga (rayauxey@gmail.com)