Flutter / Dart
Full reference for the `nest_auth_flutter` package.
nest_auth_flutter is a small, dependency-light Flutter / Dart SDK for @ackplus/nest-auth: HTTP auth flows, secure token storage, and transparent token refresh. The core NestAuthClient is pure Dart; SecureTokenStorage wraps flutter_secure_storage for production apps.
Tokens are returned in the response body and sent in the Authorization header — so the backend must run in header token mode. The client attaches the access token to authenticated requests and, on a 401, transparently refreshes once and retries. For reactive UIs, the NestAuthController (ChangeNotifier) rebuilds your widgets on login and logout.
Sections
- Getting Started — install, backend setup, creating a
NestAuthClient, and token storage adapters. - Authentication — signup, email / password, passwordless, and social login; logout; password reset; email & phone verification; change password.
- MFA & Tenancy — the MFA challenge / verify flow, reading MFA status, and
switchTenant. - Using it in your app — the reactive
NestAuthController, aListenableBuilderlogin-to-home example, and error handling withNestAuthException.