Social login
Skill launch52-ai/flutter-template/.claude/skills/social-login
Template for Flutter mobile applications.
npx -y skills add launch52-ai/flutter-template --skill social-loginAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Google Sign-In and Apple Sign-In with Supabase or custom backend. OAuth setup, platform config, PKCE/nonce security, sealed Failures, mock repository. Use when adding social login or troubleshooting OAuth.
SKILL.md
4.2 KB, 952 tokens by cl100k_base, as published. Nobody here has run it
Social Login - Google & Apple Sign-In
Google and Apple authentication with Supabase or custom backend.
When to Use This Skill
- Adding social login to a project
- Configuring OAuth providers (Google Cloud, Apple Developer)
- Troubleshooting social auth issues
- Adding SHA-1 fingerprints for Android
Reference Files
reference/
├── repositories/ # Domain interface, impl, mocks
├── failures/ # Sealed Failure types
├── providers/ # AuthNotifier social methods
├── utils/ # Nonce helpers, constants
├── widgets/ # Social login button
└── screens/ # OAuth callback (Android)
templates/ # Info.plist, AndroidManifest additions
See: implementation-guide.md for complete file list.
Workflow
Phase 1: Provider Setup
- Google Cloud Console - OAuth clients, SHA-1 (see google-guide.md)
- Apple Developer - App ID, Service ID, Key (see apple-guide.md)
- Supabase - Enable providers (see supabase-guide.md)
Phase 2: Platform Config
- iOS: Add URL schemes to Info.plist, add Sign in with Apple capability
- Android: Add deep link intent filter to AndroidManifest.xml
Phase 3: Implementation
- Copy reference files to project
- Add methods to existing AuthRepositoryImpl
- Add provider methods to AuthNotifier
- Add OAuth callback route
- Run
/i18nfor strings
Core API
// Google Sign-In
final result = await repository.signInWithGoogle();
// Apple Sign-In
final result = await repository.signInWithApple();
// Result contains: userId, email?, displayName?, isNewUser
Failure Types
| Type | When | UI Action |
|---|---|---|
GoogleSignInCancelledFailure | User dismissed | Silent |
GoogleSignInFailedFailure | SDK error | Error + retry |
AppleSignInCancelledFailure | User dismissed | Silent |
AppleSignInFailedFailure | SDK error | Error + retry |
TokenValidationFailure | Invalid token | Error + retry |
SocialAuthNetworkFailure | Connection | Retry button |
Cancellation is NOT an error - handle silently.
Platform Flows
| Provider | iOS | Android |
|---|---|---|
| Native SDK | Native SDK | |
| Apple | Native SDK | OAuth Browser |
SHA-1 Fingerprints
cd android && ./gradlew signingReport
Add to Google Cloud Console: debug, release, Play Store SHA-1.
Guides
| File | Content |
|---|---|
| google-guide.md | Google Cloud Console setup |
| apple-guide.md | Apple Developer setup |
| supabase-guide.md | Supabase provider config |
| implementation-guide.md | Step-by-step code |
| checklist.md | Verification checklist |
Common Issues
| Error | Cause | Solution |
|---|---|---|
DEVELOPER_ERROR | SHA-1 mismatch | Add correct SHA-1 |
| No idToken | Missing serverClientId | Set GOOGLE_WEB_CLIENT_ID |
invalid_client | Apple config wrong | Check Supabase Apple config |
| No callback (Android) | Deep link wrong | Verify AndroidManifest |
Checklist
- Google Cloud Console: OAuth client IDs created (iOS, Android, Web)
- Android: All SHA-1 fingerprints added (debug, release, Play Store)
- Apple Developer: App ID with Sign in with Apple enabled
- Apple Developer: Service ID configured (for Android OAuth flow)
- Supabase: Google and Apple providers enabled with credentials
- iOS: URL schemes added to Info.plist
- iOS: Sign in with Apple capability added
- Android: Deep link intent filter in AndroidManifest.xml
- OAuth callback route added to router
- Cancellation handled silently (not shown as error)
-
build_runnerexecuted successfully
Related Skills
/phone-auth- Can combine with social login/i18n- Localized strings/release- iOS capabilities, Android signing/testing- Test social login flows
What ships with it: 20 files
81.9 KB alongside SKILL.md
reference/
- exceptions/oauth_pending_exception.dart994 B
- failures/social_auth_failures.dart6.8 KB
- providers/auth_provider_social_methods.dart3.2 KB
- repositories/auth_repository_social_methods.dart5.9 KB
- repositories/mock_auth_social_methods.dart2.4 KB
- repositories/mock_social_auth_repository.dart7.1 KB
- repositories/social_auth_repository.dart1.2 KB
- router/router_oauth_callback.dart2.0 KB
- screens/oauth_callback_screen.dart2.8 KB
- utils/app_constants_social.dart984 B
- utils/nonce_helpers.dart1.7 KB
- widgets/social_login_button.dart4.1 KB
templates/
- apple-guide.md7.5 KB
- checklist.md8.1 KB
- google-guide.md7.2 KB
- implementation-guide.md8.8 KB
- supabase-guide.md8.3 KB