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