-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
I know this isn't a Firestore request, but I'm guessing a lot of people who use this package would appreciate a component with a similar API to expose the state of Firebase Auth. (I know I would.)
Sample usage:
import { FirebaseAuth } from 'react-firestore'
<FirebaseAuth>
{ ({error, isLoading, auth}) => {
if (error) {
return 'error logging you in'
}
if (isLoading) {
return 'loading account...'
}
if (!auth) {
return <LoginButton />
} else {
return <UserSummary user={auth} />
}
}}
</FirebaseAuth>Something like this could work: https://github.com/sampl/firefly/blob/master/src/data/AuthProvider.js
What do you think @green-arrow?
Metadata
Metadata
Assignees
Labels
No labels