Skip to content

WebAuthn / passwordless auth module #1414

Open

Description

@tgrushka

Is your feature request related to a problem? Please describe.
Thankfully the world is moving towards passwordless authentication. This is not only good for security, but also user experience. Biometric on-device authentication allows signing in with Face ID, Touch ID, or Fingerprint Unlock and stores the user's private key in the secure enclave of the device.

Here are a 2-minute generic intro video and guide to WebAuthn:

WebAuthn is a W3C standard subset of the emerging FIDO2 standard:

Describe the solution you'd like
I would like to see WebAuthn server be supported natively (with an auth module) in Serverpod, if feasible, so that it can act as its own Relying Party (RP) app / WebAuthn server, and a 3rd party service such as Firebase is not necessary.

This could integrate seamlessly via server, client, and Flutter modules and should be almost if not just as easy for the developer to implement as the other sign-in modules. The public keys could be stored in the Postgres database just as auth keys currently are.

The user would probably need to first sign up via another method or "magic link" as they do with other apps using this technology.

There is currently a TypeScript package that provides WebAuthn client and server implementations. I'm wondering if porting its server code to Dart could be a path.
https://simplewebauthn.dev/

There is a Flutter (client-only) package: webauthn. It has a TODO to replace local_auth with something like flutter_biometrics, which would be more secure because flutter_biometrics actually uses hardware signing on the device as opposed to "faking" it with just a true/false response like local_auth. That fix may be possible in the Serverpod Flutter implementation of the module.

Describe alternatives you've considered
One current but ill-advised possibility is to store the user's serverpod auth key / password in shared_preferences (we already store the auth key there by default) or flutter_secure_storage, and use the local_auth package to trigger the key to be sent to the server. This is not ideal because the boolean response of local_auth can be patched by a malicious hacker.

I would love to have this feature, especially for users who have difficulty remembering passwords. However, it should be a true implementation that uses device hardware signing and not just "fake" like local_auth seems to be.

Activity

  1. added
    enhancement
    on Oct 5, 2023
  2. added
    area: authentication
    on Dec 18, 2024
  3. moved this from Backlog 🗂️ to Done 🚀 in Serverpod Frameworkson Mar 28, 2026
  4. moved this from Done 🚀 to Backlog 🗂️ in Serverpod Frameworkson Mar 28, 2026
  5. moved this from Backlog 🗂️ to Inbox 📫 in Serverpod Frameworkson Mar 28, 2026
  6. moved this from Inbox 📫 to Backlog 🗂️ in Serverpod Frameworkson Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: authenticationenhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions