moai-platform-firebase-auth

Implements Firebase Authentication with social providers, phone verification, and custom claims.

Updated Jun 18, 2026
One-click install
npx skills add https://github.com/h102-log/pdfrag --skill moai-platform-firebase-auth-h102-log
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: moai-platform-firebase-auth
Source: https://github.com/h102-log/pdfrag/tree/main/.claude/skills/moai-platform-firebase-auth
Command: npx skills add https://github.com/h102-log/pdfrag --skill moai-platform-firebase-auth-h102-log

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building authentication from scratch is error-prone and time-consuming, especially when supporting multiple sign-in providers, phone verification, and role-based access control across web and mobile platforms. ## Core Features & Use Cases - Social Authentication: Implement Google, Facebook, Apple, Twitter/X, GitHub, and Microsoft sign-in for Web, Flutter, iOS, and Android with proper error handling and account linking. - Phone Authentication: Add SMS-based verification with reCAPTCHA, E.164 formatting, and platform-specific flows including Android auto-verification. - Custom Claims & RBAC: Set role-based claims via Admin SDK, enforce them through Firestore and Storage Security Rules, and manage token refresh propagation. - Use Case: A team building a Flutter app with Google Sign-In and admin roles can follow the modules to wire up authentication, set custom claims via Cloud Functions, and secure Firestore data with claim-based rules. ## Quick Start Ask the AI to implement Google Sign-In with Firebase Authentication for your web or Flutter app, including session persistence and security rules.

Frequently Asked Questions about moai-platform-firebase-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement Google Sign-In with Firebase Authentication?▼

Create a GoogleAuthProvider, add OAuth scopes, and call signInWithPopup or signInWithRedirect from firebase/auth. On Flutter, use the google_sign_in package to obtain tokens, then pass them to GoogleAuthProvider.credential before calling signInWithCredential.

How to set custom claims for role-based access in Firebase?▼

Use the Admin SDK's setCustomUserClaims method server-side to attach roles like admin or editor to a user's ID token. Clients read claims via getIdTokenResult, and Firestore Security Rules enforce access using request.auth.token values.

Does Firebase phone authentication work on Flutter and iOS?▼

Yes, Firebase phone auth supports Web, Flutter, iOS, and Android. Flutter uses verifyPhoneNumber with callbacks for auto-verification, while web requires a RecaptchaVerifier and phone numbers must use E.164 format.

Why are my Firebase custom claims not updating on the client?▼

Claims only propagate when the ID token refreshes, which can take up to one hour. Force an immediate refresh by calling getIdToken(true) on the current user, or send an FCM notification to trigger client-side refresh.

Can I link an anonymous Firebase account to a permanent one?▼

Yes, sign in anonymously with signInAnonymously, then upgrade using linkWithCredential with an email/password credential or linkWithPopup with a social provider. The user retains the same UID after linking.