kashi_auth library

Flutter sign-in for @softwareseva/auth: API calls, sign-in screen, passkey settings, biometric lock, adapter seams.

Classes

AccessTokenResult
Result of a native Facebook Login (the SDK returns an access token, not an ID token).
AuthProviders
IdTokenResult
Result of a native OAuth sign-in (Google, Apple). name is only sent by Apple on first sign-in.
KashiAuthApi
KBiometricGate
Wrap the signed-in part of the app. authenticate is the app's local_auth call (see the flutter-auth skill); return true when the user passed. enabled lets users switch it off.
KPasskeySettings
KSignIn
PasskeyBridge
Bridges WebAuthn JSON between the server and a platform passkey plugin.
PasskeyItem
PeerConfig
A trusted peer kashi site this app can sign in through ("Continue with {label}").

Properties

authProvidersProvider → FutureProvider<AuthProviders>
final
kashiAuthApiProvider → Provider<KashiAuthApi>
final
passkeysProvider → FutureProvider<List<PasskeyItem>>
final

Functions

authMessage(KashiFailure f) → String

Typedefs

AccessTokenSignIn = Future<AccessTokenResult?> Function()
Runs the Facebook Login sheet. Return null when the user cancels; throw on real errors.
IdTokenSignIn = Future<IdTokenResult?> Function()
Runs the platform sign-in sheet. Return null when the user cancels; throw on real errors.
PeerBrowserSignIn = Future<Uri?> Function(Uri authorizeUrl, Uri redirectPrefix)
Runs a peer kashi site's sign-in page in a system browser (e.g. flutter_web_auth_2 or ASWebAuthenticationSession/Custom Tabs directly) and returns the final redirect URL once the site completes it. kashi_auth pulls in no browser/webview plugin, same as it pulls in no Google/Apple/Facebook SDK — the host app supplies this bridge. Return null when the user dismisses the browser; throw on real errors.

Exceptions / Errors

SignInCancelled
Thrown by adapters when the user dismissed the system sheet; the UI stays quiet.