Before you get started, you must add the FirebaseTS library to your project. Follow this tutorial to learn how to add FirebaseTS.
Before you get started, you must add the FirebaseTS library to your project. Follow this tutorial to learn how to add FirebaseTS.
Also, make sure to enable the email and password sign in method for the Firebase project.
In this tutorial, we will be using the signInWith() method from the FirebaseTSAuth class to sign in.
Setup
1. Import the FirebaseTSAuth class.
2. Instantiate an FirebaseTSAuth object.
Signing in with Email and Password
To sign in with Email and Password, call the signInWith() method and populate the email and password properties.
this.auth.signInWith(
Signing in with 3rd Party Providers
To sign in with 3rd party providers, call the signInWith() method and use the provider property.
this.auth.signInWith(
The list of providers current supported are:
"Google" | "Yahoo" | "Facebook" | "Apple" | "Github" | "Twitter" | "Microsoft"
Handling code on complete or fail
Sometimes, you may want to execute some code afterwards. Add the onComplete and onFail callback functions.
We can also use then() and catch() as well since the signInWith() method is a promise.
this.auth.signInWith(