implementing-flutter-social-auth
Skill7 starsChanged 8 months agoMITView on GitHub
Social authentication and OAuth/SSO for Flutter supporting Google Sign-In, Apple Sign-In, Facebook Login, and LINE Login. Use when implementing social login, OAuth flows, sign-in with Google/Apple/Facebook/LINE, SSO integration, third-party authentication, platform credential configuration (SHA-1 fingerprint for Android, Service ID for Apple, App ID for Facebook, Channel ID for LINE), native auth flows, minimal viable examples, error handling patterns, or troubleshooting authentication failures, token handling, and sign-in errors (ApiException, PlatformException).
In this repository41 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- skill-creatorSkill
- flutter-dbSkill
- flutter-routingSkill
- flutter-state-managementSkill
- configuring-codemagicSkill
- applying-effective-dartSkill
- deploying-with-fastlaneSkill
- integrating-firebaseSkill
- implementing-fl-chartSkill
- integrating-google-adsSkill
- animating-flutter-widgetsSkill
- routing-with-autorouteSkill
- implementing-flutter-blocSkill
- configuring-deep-linksSkill
- persisting-data-with-driftSkill
- building-flutter-production-appsSkill
- generating-flutter-uiSkill
- routing-with-gorouterSkill
- managing-hive-storageSkill
- using-flutter-hooksSkill
- running-flutter-isolatesSkill
- managing-flutter-provider-stateSkill
- implementing-responsive-layoutsSkill
- implementing-riverpodSkill
- managing-secure-storageSkill
- flutter-setupSkill
- managing-shared-preferencesSkill
- flutter-testingSkill
- using-fpdartSkill
- generating-freezed-modelsSkill
- configuring-github-actionsSkill
- building-jaspr-web-appsSkill
- testing-with-marionetteSkill
- implementing-openapi-in-dartSkill
- integrating-revenuecatSkill
- integrating-sentrySkill
- developing-serverpod-backendSkill
- building-shadcn-flutter-uiSkill
- integrating-supabaseSkill
- converting-ts-to-dartSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
Initialize: Call the respective plugin init or configuration methods.
- Very specific: line 47
Native Overlays: Always call WidgetsFlutterBinding.ensureInitialized() before initializing auth plugins in main().
- Very specific: line 48
Security Awareness: NEVER store raw AccessTokens in SharedPreferences.
- Distinctive: line 49
Privacy Compliance: Ensure Apple Sign-In is implemented if any other 3rd party social login is offered on iOS.
- Very specific: line 50
Error Resilience: Always handle the cancel state gracefully when a user closes the auth popup.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flutter Social Authentication Guide
Goal
Implement secure, high-quality social authentication in Flutter applications across iOS, Android, and Web. This skill focuses on the most common identity providers (Google, Facebook, Apple) using best-practice plugins and native configuration strategies to ensure a seamless "Privacy-First" user experience.
Process
Phase 1: Provider Selection & Requirements
Identify the required social providers and gather necessary developer portal credentials.
- Google: Google Cloud Console / Firebase Console (SHA-1 fingerprint required for Android).
- Facebook: Meta for Developers (App ID, Client Token).
- Apple: Apple Developer Program (Service ID, Team ID, Key ID).
- LINE: LINE Developers Console (Channel ID).
Phase 2: Platform-Specific Configuration
Each provider requires specific configurations in AndroidManifest.xml, Info.plist, or web/index.html.
- Google Sign-In Setup
- Facebook Login Setup
- Apple Sign-In Setup
- LINE Login Setup
Phase 3: Implementation & State Management
Integrate the authentication flow with the app's state management (e.g., Riverpod 3.0 Notifiers).
- Initialize: Call the respective plugin
initor configuration methods. - Authenticate: Trigger the login flow and capture the
AccessTokenorIdToken. - Handle Persistence: Store credentials securely using
flutter_secure_storage. - Error Handling: Implement retry logic and display user-friendly error messages (e.g., ApiException 10 for Google).
📚 Documentation Library
Refer to these specialized resources for each identity provider:
- 🎯 Google Sign-In Best Practices
- 👤 Facebook Login Best Practices
- 🍎 Apple Sign-In Best Practices
- 💬 LINE Login Best Practices
Constraints
- Native Overlays: Always call
WidgetsFlutterBinding.ensureInitialized()before initializing auth plugins inmain(). - Security Awareness: NEVER store raw AccessTokens in
SharedPreferences. UseSecure Storage(encrypted). - Privacy Compliance: Ensure Apple Sign-In is implemented if any other 3rd party social login is offered on iOS.
- Error Resilience: Always handle the
cancelstate gracefully when a user closes the auth popup.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

