Since you've already set up Google and Apple authentication in Firebase, you now need to configure the environment variables for your app.
- Go to your Firebase Console
- Select your project
- Go to Project Settings (gear icon)
- Scroll down to Your apps section
- If you don't have a Web app, click Add app and select Web
- Copy the configuration values
- Go to Google Cloud Console
- Select your Firebase project
- Go to APIs & Services β Credentials
- Look for OAuth 2.0 Client IDs
- Copy the Web client (auto created by Google Service) client ID
Create a .env file in your SnapConnect directory with the following variables:
# Firebase Configuration
EXPO_PUBLIC_FIREBASE_API_KEY=your-actual-api-key
EXPO_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
EXPO_PUBLIC_FIREBASE_PROJECT_ID=your-actual-project-id
EXPO_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
EXPO_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your-actual-sender-id
EXPO_PUBLIC_FIREBASE_APP_ID=your-actual-app-id
# Google Sign-In Configuration
EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID=your-actual-web-client-id.apps.googleusercontent.comMake sure in your Firebase Console:
- Authentication β Sign-in method
- Google is enabled
- Apple is enabled (iOS only)
- Email/Password is enabled
For Apple Sign-In to work:
- iOS Bundle ID: Make sure your
app.jsonbundle identifier matches your Apple Developer account - Apple Developer Account: Ensure Sign In with Apple is enabled for your app
- Firebase Apple Config: In Firebase Console β Authentication β Sign-in method β Apple, make sure it's configured
Once configured:
- Restart your Expo development server
- Test Google Sign-In (Android/iOS)
- Test Apple Sign-In (iOS only)
- Test Email/Password Sign-In
- Demo Mode: I've disabled demo mode in your Firebase service
- Real Authentication: Now uses actual Firebase authentication
- OAuth Flow: Users will see the real Google/Apple sign-in prompts
- User Consent: Users must explicitly approve sign-in (no more automatic sign-in)
- Before: Clicking Google/Apple buttons immediately signed you in with demo data
- After: Clicking Google/Apple buttons will:
- Open the respective OAuth flow
- Ask for user permission
- Only sign in after user approval
- Create real Firebase user accounts
This gives you the proper authentication flow you requested!