bondify_flutter library
Bondify Flutter SDK One-tap Telegram authentication for Flutter apps.
Quick start:
import 'package:bondify_flutter/bondify_flutter.dart';
BondifyButton(
projectId: 'proj_xxxxxxxx',
onSuccess: (user) {
// Send user.proof to YOUR backend and verify it there.
debugPrint('Welcome, ${user.name}');
},
)
Classes
- BondifyButton
- BondifyCancelToken
- A cancellation handle for an in-flight authentication.
- BondifyClient
- BondifyConfig
- SDK configuration. Only projectId is required.
- BondifyTelegramIcon
- BondifyUser
- The result of a successful Telegram authentication.
- GenerateResponse
-
Raw response of
POST /api/v1/generate/public. - VerifyResponse
-
Raw response of
POST /api/v1/verify/public(pending or confirmed).
Enums
- BondifyStatus
- Authentication status reported while waiting for the user to confirm.
- BondifyTheme
- Visual theme for BondifyButton.
Functions
-
showBondifyAuthSheet(
BuildContext context, {String? projectId, String? apiBase, String title = 'Sign in', String subtitle = 'Authenticate securely with your Telegram account.', BondifyTheme theme = BondifyTheme.telegram}) → Future< BondifyUser?> - Shows a bottom sheet with a Bondify login button.
Exceptions / Errors
- BondifyException
- Thrown when authentication fails (network, timeout, cancelled, expired…).