import React from 'react'
import { Text, ActivityIndicator } from 'react-native'
import { DoormanProivder, AuthFlow, AuthGate } from 'react-native-doorman'
import firebase from 'firbase/auth'
if (!firebase.apps.length) {
firebase.initializeApp(yourFirebaseConfig)
<DoormanProvider publicProjectId="YOUR-PROJECT-ID">
{({ user, loading }) => {
if (loading) return <ActivityIndicator />
// if a user is authenticated
if (user) return <AppWithAuth />
// otherwise, send them to the auth flow
const AppWithAuth = () => (
<Text style={{ marginTop: 300, color: 'purple' }}>
This app has working phone auth 🤯