搜尋套件、儲存庫與 APP 分類

passkeys 封面
套件詳情v2.24.1

passkeys

Flutter 插件,支援簡單的 passkey 驗證。可與現成的依賴方伺服器(Corbado)搭配使用,或與您自訂的依賴方搭配使用。

AndroidiOSWebmacOSWindows
近 30 天下載
24.1萬
喜歡數
115
Pub 分數
150

安裝套件

flutter pub add passkeys

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

passkeys 套件是一個 Flutter 插件,可簡化跨多個平台(包括 Android、iOS、Web、macOS 和 Windows)的 passkey 身份驗證。它支援與 Corbado 的即用型依賴方伺服器整合,或自訂依賴方實作。此套件設計用於提供安全的無密碼登入體驗,並利用平台原生的生物識別與裝置驗證機制。該外掛抽象複雜的加密運算,讓開發者能以最少設定實現現代化驗證流程。非常適合重視安全性與使用者便利性的應用。

適用情境

  • 無密碼登入
  • 生物識別認證
  • 安全應用存取
  • 跨平台身分驗證
  • 與身分提供者整合

主要特色

  • 支援 Corbado 和自定依賴方
  • 平台原生生物識別
  • 跨平台相容性
  • 用於密鑰管理的簡單 API
  • 安全憑證存儲

適合對象

  • 需要強認證的應用
  • 開發無密碼系統的開發者
  • 使用 Corbado 或自定義 IdP 的團隊
  • 移動和桌面應用程式
  • 注重安全的應用程式

使用建議

  • 需要後端依賴方設定
  • 僅限支援的平台
  • 取決於設備生物識別功能的可用性
  • 可能需要為自定義伺服器進行額外設定
  • 不適用於非生物特徵環境

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

GitHub Repo Cover

Flutter passkeys

Flutter packages to enable passkey authentication (based on WebAuthn / FIDO2).

Android iOS Linux macOS Web Windows
Support :white_check_mark: :white_check_mark: :x: :white_check_mark: :white_check_mark: :white_check_mark:
passkey-signup

Current list of packages

1. Passkeys
Description

A Flutter package that enables simple passkey authentication. Currently Android, iOS, macOS, Web and Windows are supported.

Features
  • sign up and login users with passkeys
  • connect your own relying party server or use pre-implemented ones

Read more

2. Corbado Auth
Description

A Flutter package that builds on the passkeys package. It adds additional functionalities to make it simpler to use passkey authentication in your own Flutter app.

integration-guides

Features
  • sign up and login users with passkeys
  • connect Corbado as pre-implemented relying party server
  • keep users logged in even if they close the app (automatic session refresh)

Read more

3. Corbado Auth Firebase

A Flutter package that builds on the corbado_auth and the passkeys package. It helps you to integrate passkey authentication into your Flutter app that uses Firebase as a backend.

Note: This package is currently broken and will be fixed in the future. There is no specific ETA on when the fix will be available.

Features
  • allow new users to sign up and log in using passkeys
  • allow existing users (that you created with Firebase authentication) to setup a passkey and then log in with it
  • email OTP codes as fallback mechanism for situations when passkeys can not be used (e.g. when a user logs in to a device where none of his passkeys is available)

Read more

4. Supabase

The passkeys package can be used as the platform authenticator for supabase_flutter. Supabase Auth acts as the relying party server, while passkeys handles the native passkey prompts on iOS, Android, macOS, Windows and Web.

It requires supabase_flutter 2.15.0 or later and passkeys 2.21.0 or later.

Setup

Add both packages to your pubspec.yaml:

dependencies:
  supabase_flutter: ^2.15.0
  passkeys: ^2.21.0

Initialize Supabase as usual and create a PasskeyAuthenticator that you pass to the passkey methods:

import 'package:passkeys/authenticator.dart';
import 'package:supabase_flutter/supabase_flutter.dart';

await Supabase.initialize(
  url: supabaseUrl,
  anonKey: supabaseAnonKey,
);

final supabase = Supabase.instance.client;
final authenticator = PasskeyAuthenticator();
Registering a passkey

Registering a passkey requires a signed in (non-anonymous) user. It adds a passkey to the current account:

try {
  final passkey = await supabase.auth.registerPasskey(authenticator);
  print('Registered passkey ${passkey.id}');
} on AuthException catch (e) {
  print(e);
}
Signing in with a passkey
try {
  final res = await supabase.auth.signInWithPasskey(authenticator);
  print('Signed in as ${res.user?.email}');
} on AuthException catch (e) {
  print(e);
}

For custom flows there is also a two-step API under the supabase.auth.passkey namespace (startRegistration/verifyRegistration and startAuthentication/verifyAuthentication), as well as methods to list, rename and delete passkeys.

For the full guide and configuration steps, see the Supabase passkeys documentation.

Contributing

We're happy to receive your pull requests. For major changes, please open an issue first to discuss what you would like to change.

Support

If you have questions, feedback or wishes regarding features, please reach out to us via [email](mailto:contact@corbado.com) or join our passkeys community on Slack.

License

BSD-3-clause

所屬分類

依賴

依賴清單 8 項

原始碼儲存庫

使用此套件的專案