3 (4)
Making Mobile Applications Professional with Firebase Authentication

 

If you are a mobile application developer, you are probably trying to write your own applications outside of your business life. Apart from the design, how appealing and professional are the applications you are trying to write to the user? At this point, Firebase comes to the rescue of the software developer.

1-    What is Firebase?

In short, we can say that Firebase is an application development kit offered by Google, which is partially free and can be used in desktop applications, especially mobile ones. There are many tools in this kit that offer convenience to the user and serve different purposes. Some of these tools are as follows.

 

-        Authentication

-        Cloud Firestore

-        Realtime Database

-        Machine Learning

-        Functions

-        Cloud Messaging

-        Crashlytics

-        Google Analytics

Click for the tools mentioned above and more detailed information.

2-    What is Firebase Authentication and what is it used for?

Imagine you are making a simple mobile application where users interact with each other. Each user must be defined in the system. So, when users first register to the application, would it be more effective and more professional for the users to register by simply entering their name information or to register to the application with their accounts such as Google, Icloud, Facebook, X? At this point, the Firebase Authentication tool comes to the rescue of software developers.

3-    Methods for Creating a User with Firebase Authentication

In order to use the Firebase Authentication tool, you must first log in to the Firebase Console with a Google account. If you do not have a Google account, you can create a new account. After logging in, it is selected which platform to develop for. (IOS, Android, WEB) After selecting the platform, a new project is created. While in the created project, the Authentication tool is accessed. Selection of user creation methods for those who will use the application is made here.

As seen in the image above, there are many authentication methods. Which of these methods we will use in practice depends entirely on the software developer's initiative and usage needs. In order to use any of these methods, it is necessary to click on the relevant method and activate the option.

It is possible to use more than one authentication method at the same time in an application. However, it is recommended that you use a maximum of four methods together in order to avoid creating a perception of too much complexity on the user's side.

When using authentication methods, the usage of each method differs while writing the codes of the application. For example, when logging in with Facebook, ID information obtained from the Facebook Developer page is written into the application codes. Similarly, this is the case with Twitter and Icloud. After successfully applying the Authentication method, your applications will be perceived as more reliable and professional by users. Now let's talk about the more detailed features of these methods.

 

-        Email address verification

When the user registers to the application for the first time, after the registration is completed successfully, a verification e-mail is sent to the e-mail address with which the user has registered to the system (if the user has registered with methods such as Facebook or Google, the e-mail addresses here are automatically registered in the system). In this way, you can present your application to end users with verified, real users. Firebase authentication allows you to edit the template of the e-mail that will be sent to users during this verification as you wish.

The image shows the template of the verification email sent to the user by default. To edit this template, simply press the edit button in the upper right corner. From here, you can change general information such as sender name, sender e-mail address, and message content as you wish. Below is a modified example of the default template.

The more we can fill the template here in a way that appeals to the user, the more reliable the application will appear to the user.

 

As soon as the user clicks on the link in the verification e-mail and verifies his account, he will now be a registered user in the system and background checks will be provided by Firebase Authentication every time he enters your application.

 

-        Password Reset

Let's say the user forgot his password because he did not log in to the application for a long time or for some reason. In this case, there is a structure where we can send an e-mail to the user so that he can reset his password. In this structure, there is a default e-mail template, just like when creating a user from scratch. We can make any changes we want on this template and provide users with a more professional service.

-        Changing Email Address

Sometimes users may be in a situation where they cannot access the e-mail addresses they use in daily life, they do not want to use this e-mail address anymore and use a new e-mail address. At this stage, they may also want to change their e-mail address from your application. Firebase Authentication also allows users to change their email address.

Just like in other processes, there is a default e-mail template here. When the user wants to change his e-mail address, he will receive the e-mail shown in the template above, and after clicking on the link in this e-mail, he will be able to register his new e-mail address to the system. This will increase the flexibility of your application in the eyes of the user.

 

-        Multi-Factor Authentication

Nowadays, application security has gained special importance and users now care about their security more than before. Some users may want to use multi-factor authentication when logging into the application. In this case, the developer supports the multi-factor authentication feature by writing this setting into the application codes. Because Firebase Authentication is already a Google-based product and issues such as security are supported by Google, there is no need for a multi-factor login feature. In addition, since multi-factor authentication is subject to a certain fee by Firebase Authentication, application developers do not use this feature much.

 

Again, there is a default template for multi-factor authentication and we can edit this template as we wish.

-        Changing SMTP Server Settings

Users are notified during registration, password resetting, etc. Google's SMTP servers are used when sending emails. If developers want to use their own SMTP servers, Firebase Authentication supports this. As seen in the image below, you can save the information of your own SMTP servers and ensure that e-mails are now managed through these servers.

4-    Reviewing Firebase Authentication User Statistics and User Limitation

Firebase Authentication has a simple interface that allows us to view user statistics. Through this interface, you can check users' activities on a daily and monthly basis and see the statistics of SMS sent to users by applying the filters you want.

For a more detailed interface, you can change the plan of your Firebase subscription and get paid add-ons. You can also access more comprehensive and understandable statistics by adding Google Analytics, a tool of Firebase, to your applications. Click to get detailed information about Google Analytics.

 

Within Firebase Authentication, you can authorize and limit your users' transactions and even prevent the users you want from registering to your system. For this, Firebase offers us a simple interface. Below is the image of this interface.

As can be seen from the image, some features are unavailable. In order for these features to be active, you need to change your Firebase subscription plan.

 

You can access all this and more details from the link. Until we see you in our next article. Goodbye..

 

Sources

-        https://firebase.google.com/

-        https://accounts.google.com/v3/signin/identifier?continue=https://mail.google.com/mail/&service=mail&theme=glif&flowName=GlifWebSignIn&flowEntry=ServiceLogin

-        https://developers.facebook.com

-        https://console.firebase.google.com/

 

 

 

Erdoğan Civil
November 20 , 2024
Other Blog Articles