Firebase Integration Into User App
Last updated
Last updated
Open the project in your code editor and navigate as follows:-
Src -> Environments -> “environments.ts”
The code to be replaced is shown and highlighted below. Replace the highlighted code below with the code you copied to text editor from firebase in previous step.
Now open environments.prod.ts file from Environments folder.
The code to be replaced is shown and highlighted below. Cut the highlighted code shown below. Paste the code you copied to text editor from firebase in previous step here.
The image shown below is the same screen we saw after competing all the steps of New Firebase Project Setup section in firebase console. Click on “Continue to console” button.
You should see the following screen where your app will be added to firebase.
Click on “database” shown under the "Develop" section.It should show you the following screen and click on “Create database”
Select “Start in test mode” and click “Next” as shown below.
Click on “Done”. It should show you the following screen.
Open your app running on localhost as shown below and refresh it.
Click on “register” and it should show you the following screen. Fill your details to sign up as a user for the app and click “Next”.
As you can see below the sign in provider is disabled for this firebase project. Click on "Done"
Let us go to Firebase console to enable "sign in". Click on “Authentication” shown under the "Develop" section. It should show you the following screen.
Click on "Sign in method". It should show you the following screen.
Select the "Email/Password" at the top of this list of "Provider" (which is disabled currently). It should show you the following screen. "Enable" the first option and make sure that second one is "diasbled" and click “Save”.
Let us go back to our app running on localhost as shown below and click “Next”.
You should be able to login now. Screen showing your current location on the map should appear now, as shown below.
Add a "Pick up location" and a "Destination location". Book a ride and you should be able to see the following screen after waiting for a while.
Now we have successfully completed running the Taxi user App. Let us run the taxi driver app so that we can test our Taxi app completely.
Go to Driver App Setup section to see how to do it.