Labsco
auth0 logo

auth0-flutter-native

37

by auth0 · part of auth0/agent-skills

Use when adding Auth0 login, logout, or biometric-protected credential storage to a Flutter mobile app (iOS or Android). Integrates auth0_flutter on the native platform — use even if the user says "add login to my Flutter app".

🧩 One of 7 skills in the auth0/agent-skills package — works on its own, and pairs well with its siblings.

This is the playbook your agent receives when the skill activates — you don't need to read it to use the skill, but it's here to audit before installing.

Auth0 Flutter Native (iOS/Android) Integration

auth0_flutter is the official Auth0 SDK for Flutter applications. On mobile (iOS/Android), it performs authentication through the device's system browser (Web Auth / Universal Login) and stores tokens securely in the platform keychain/keystore via the built-in CredentialsManager, with optional biometric protection.

Agent instruction: Before providing SDK setup instructions, fetch the latest release version by running one of:

gh api repos/auth0/auth0-flutter/releases/latest --jq '.tag_name'
flutter pub info auth0_flutter 2>/dev/null | head -5

Or check pub.dev:

curl -s https://pub.dev/api/packages/auth0_flutter | python3 -c "import sys,json;print(json.load(sys.stdin)['latest']['version'])"

Use the returned version in all dependency lines instead of any hardcoded version below. Current known version: 2.1.0.

When NOT to Use

Detailed Documentation

  • Setup Guide — Auth0 application creation via the Auth0 CLI, Android manifestPlaceholders, iOS Info.plist / Associated Domains, callback URL registration
  • Integration Patterns — Web Auth login/logout, CredentialsManager, biometric protection, custom schemes, organizations, API access tokens, state management patterns, error handling
  • API Reference & Testing — Full API reference, configuration options, claims reference, testing checklist, troubleshooting

Quick Reference

APIPurpose
Auth0(domain, clientId)Create the SDK client
auth0.webAuthentication().login(...)Launch Universal Login in the system browser
auth0.webAuthentication().logout()Clear the browser session
auth0.webAuthentication(scheme: '...')Use a custom URL scheme
auth0.credentialsManager.credentials()Get stored credentials (auto-renews if expired)
auth0.credentialsManager.hasValidCredentials()Check for a valid stored session
auth0.credentialsManager.clearCredentials()Wipe stored credentials
LocalAuthentication(title: ...)Enable biometric protection of stored credentials

References