DEV Community

Cover image for Open-Source Flutter Passkeys Package
vdelitz for Corbado

Posted on • Updated on • Originally published at corbado.com

Open-Source Flutter Passkeys Package

In the evolving landscape of digital security, passkeys are emerging as a robust and user-friendly authentication method. Our recent blog post delves into the architecture of our open-source Flutter passkeys package, designed to streamline the integration of passkeys into your Flutter apps.

GitHub repository
pub.dev

Understanding Passkeys

Passkeys offer a departure from traditional password-based authentication systems. With passkeys, the user creates a public/private key pair during the sign-up process. The public key is stored on a backend server, known as the “relying party server”, while the private key is securely kept on the user’s device.

During each login, the client app requests a cryptographic challenge from the relying party server. This challenge can only be solved using the private key, which is protected by the user’s biometrics, such as Face ID or Touch ID. Once the user’s identity is verified, the device signs the challenge and sends it back to the server.

The Flutter Passkeys Package

Our Flutter passkeys package simplifies the process of integrating passkey authentication into your Flutter apps. It abstracts and connects two key components: the authenticator and the relying party server. The authenticator leverages OS functionalities to create a passkey and sign passkey challenges, while the relying party server manages the storage and retrieval of public keys.

Implementing Passkeys in Flutter

The package includes an example project that you can clone to your machine. This project demonstrates how to set up a UI for login, sign-up, and logged-in states, and how to perform passkey authentication. When the user clicks on the login or sign-up button, the respective action is performed, and the widget is updated once the result is available.

Customizing the Package

The package is designed to be flexible and customizable. You can add native plugins for making Flutter passkeys available e.g. for macOS, Windows or web app. Besides that, you can also integrate your own passkey backend or use hosted one (e.g. from Corbado) giving you maximum flexibility.

To learn more about the detailed implementation and to explore the full capabilities of our Flutter passkeys package, check out pub.dev. Discover how passkeys can enhance the security and user experience of your Flutter apps.

Top comments (0)