pasby

Flutter SDK for integrating Pasby authentication flows.

Install

For pub.dev:

dependencies:
  pasby: ^0.1.0

Features

  • Pasby service client (PasbyAuthWithServerFunctions)
  • Auth flow models (AuthFlowResponse, SecureStartData, PingFlowResponse)
  • Ready-to-use UI components (AuthenticateDifferentDevice, PasbyOnDifferentDeviceSheet, PasbyLogo)

Quick start

import 'package:pasby/pasby.dart';

final pasbyServer = PasbyAuthWithServerFunctions(
  baseUrl: 'https://api.example.com',
  paths: Paths(
    '/pasby/auth',
    '/pasby/cancel',
    '/pasby/ping',
    '/pasby/wildcard',
  ),
  header: const {'Authorization': 'Bearer YOUR_TOKEN'},
);

Use the AuthenticateDifferentDevice widget in your login UI and handle success/failure callbacks to complete your app-specific sign-in flow.

Requirements

  • Dart ^3.4.4
  • Flutter >=3.22.0

License

MIT

Libraries

pasby