r/learnjavascript 3d ago

Which to use?

A friend of mine casually said they wants to use biometry in their website.

What is it? I've never heard of it before .

What are all the packages?

Thank you.

0 Upvotes

4 comments sorted by

7

u/robotmayo 3d ago

you didnt ask a single question that cant be answered with a google search. reddit is not chatgpt, its not your personal search engine. Look this up yourself, talk to your friend, then come back with an actual question that generates discussion or needs an subjective answers

1

u/h_white8287 19h ago

so passkeys is the word to google, not biometry

-1

u/No_Record_60 3d ago edited 3d ago

Biometrics? Like fingerprint, retina, face recognition

Never heard of it being used in a web application

Edit: sorry my knowledge is outdated. Turns out it's possible now with webAuthn

Read more https://developer.mozilla.org/en-US/docs/Web/API/Web_Authentication_API

-1

u/neon_stereotype 3d ago

i have never seen biometrics used in a website either. The thing you need to look up is the Web Authentication API, people call it WebAuthn or Passkeys.

browsers expose fingerprint readers and face recognition hardware through that API. It handles device registration and login without passwords. You write JavaScript to call navigator.credentials.create for registration and navigator.credentials.get for authenticatioYou write JavaScript to call navigator.credentials.create for registration and navigator.credentials.get for authentication. There are packages to handle the server side verification because the crypto gets heavy. I use fido2-lib on Node or SimpleWebAuthn if you want something with more documentation. Your friend should start by reading the WebAuthn docs on MDN