Firebase UI: Authentication using email link FIREBASE
- Firebase Tutorial
- Features of Firebase
- Android Studio
- Firebase - Environment Setup (with android studio)
- Firebase Assistance - Android Studio
- Firebase Authentication
- Firebase: Google Sign-In Authentication
- Firebase: Facebook Sign-In Authentication
- Firebase: Sign-In Authentication Using Phone Number
- Firebase UI: Authentication using email/password
- Firebase UI: Authentication using email link
- Firebase SDK: Authentication using email/password
- Firebase SDK: Authentication using the email link
- Firebase: Realtime Database
- Firebase: Real-time database setup and configuration
- Firebase: Data Organization in Real-time Database
- Firebase: Realtime Database Reading and Writing
- Firebase: Realtime Database Update and Delete
Firebase UI: Authentication using email link
10 steps to understand how we can perform authentication using the email link and no password.
In the previous topic(Firebase UI: Authentication using email/password), we learned how we could use Firebase UI libraries to provide email, phone, and Google authentication. Similarly, we will learn how we can use Firebase UI libraries to provide email link/no password authentication.
So let's see the step by step process.
In the first step, let's create a new project and add Firebase to it using any of the methods either from manually or Google Assistance. For connecting Firebase to the project, please go through the following link: Firebase - Environment Setup (with android studio)
After connecting Firebase to our application and applying plugins, you have to enable email link authentication in Firebase console.
In the next step, you need to enable the dynamic links for the email link. For this, you need to add a link. So just click on get started.
After clicking on Get started button, a new pop up box will be shown. Add a URL prefix and ensure that the page link has not been used in the past.
After clicking on Finish, the dynamic link will be created successfully
The next thing you need to do is, we will add the domain to the authentication.
The domain will be matched with our code, which we will add in the firebase console.
The last thing we need to do for setting up the dynamic links in order to be able to catch the link is to set SHA-1 and SHA-256. To understand how these keys can be found, click here. We will go to the setting of our project and click on Add fingerprint. This will be used for adding both SHA-1 and SHA-256.
In the next step, Now, go to the Android Studio and create an activity for sign-in i.e., an activity with a single button.
Now, create a tag for logging. And inside the event handler, you need to set up our action code setting object. It is the main logic for a password list sign-in and email.
Now, you need to handle the callback. And use start activity to resolve it in the following way:
Now let's create onActivityResult() just like we have used previously:
The last thing which you have to do is catching the dynamic link. Now catch the dynamic link inside the
Now it's time to run our application. When we run the application, it will show the following output: