From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Create new documents with the user connected
From the course: Building Production-Ready React Apps: Setup to Deployment with Firebase
Create new documents with the user connected
- [Instructor] Something you want to also enable is to allow automatic sign-in. So we also want to manage users so they can be automatically signed in. So I'm going to add this first in our, so whenever we defined the handler functions for the SDK, right here. And this one I'm going to set up right here, and I'm going to call it, this function, I'm going to call get current user. So we're going to set this one up too, this is going to return also a promise. And basically we're going to do that with the auth objects and call this function, which is on auth state changed. And we're going to pass resolve because whichever results we get from this on auth state change, we're going to pass this like when we return the promise. And let's go back to our context object right here. So we are going to add this one which is authenticate. Now, I want to name it, yeah, it's going to be get current user. And then here, I'm going to name…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
(Locked)
Start with Firebase Authentication and select the provider2m 57s
-
(Locked)
Google Cloud Platform: Create new credentials3m 17s
-
(Locked)
Authenticate and manage users from the application5m 46s
-
(Locked)
Manage the state with the Context API: Component Provider5m 3s
-
(Locked)
Manage the state with the Context API: Custom hook5m 34s
-
(Locked)
Subscribe components to the context changes: User connected4m 59s
-
(Locked)
Create new documents with the user connected5m 26s
-
(Locked)
Secure your data in Cloud Firestore and Cloud Storage5m 43s
-
(Locked)
-
-
-
-