24

I have mobile website and in this application I want to use device's native PIN, Faceid and Fingerprint authentication, is this practically somehow possible? because I don't think browser would allow me something like that.

Also I heard that if I want to have this kind of behaviour, I should create PWA(progressive web app). So is it true that from browser(without PWA) I can't use any of these three authentication types and that PWA will give me opportunity to use all of them?

1

2 Answers 2

23

Yes the Web Authentication API is available, which allows you to delegate authentication to the device's authenticators, including common mobile authenticators such as fingerprints or face ID. Your server application will need to support this method of authentication as well, so keep that in mind.

All modern browsers have supported Web Authentication API for a while now.

You can try out a demo and view code examples here: https://webauthn.io

4
  • I have the opposite question; I have a desktop web app, Is it possible to use my mobile phone to login with a Fingerprint to my web app via Web Authentication API ?
    – Ben.S
    Commented May 23, 2021 at 5:04
  • what a gorgeous thing.. I hope there`s not so much difficult to implement.. Commented Jun 7, 2021 at 14:58
  • 1
    @Ben.S Create a PWA to receive push notifications. Use the Web Authentication API as described to identify the user and pass the result back to your app. Think about possible points of attack and avoid them.
    – Sebastian
    Commented Aug 24, 2021 at 14:23
  • @Sebastian thanks can you elaborate on the your answer in my own question link stackoverflow.com/questions/68163069/…
    – Ben.S
    Commented Aug 25, 2021 at 3:45
6

Mark's answer is amazing and points you to the most-official Web Authentication API documentation. But if you are like me (tried to understand the documentation and then give it a try to build everything from scratch), it may be a bit of a challenge.

To make your implementation process easier, I recommend you to check out SimpleWebAuthn. They have ready-to-use code for browser and a server using Typescript - NodeJS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.