
When it comes to web or mobile app development, security is the key function to be concerned. Find out how to choose authentication method for your project.
Authentication is a common way to handle security for all applications. This is the only way to answer the question “who you are?” to the application, when comes to stateless architecture or service-oriented architecture we get a lot of new concepts and technologies in the market. You can find the details of different type of methods on the internet. In this article, I wrote about how to choose the authentication method.
Types of Authentication
Stateless authentication is used all around the world. Above are the common practices for web or mobile authentication. I can say that there is no perfect method for your project. But, you have to choose the best suitable method for your project.
SSO(Single Sign ON)
Nowadays, SSO(Single Sign ON) is used by big tech companies. If you have multiple portals for different users, you should definitely go for the SSO. As a user, he/she doesn't have to remember different passwords. Also, they don't have to login multiple times. You can choose a different service provider for your project like Amazon AWS, Microsoft Azure etc.
Open Authentication(OAuth)
If you want to integrate third-party authentication like Login via Facebook or Google or Linkedin or Github or any other specific site, you have to go for Open Authentication(OAuth). OAuth is a protocol that allows an application to authenticate against server as a user. The recommendation is to implement OAuth 1.0a or OAuth 2.0. OAuth 2.0 relies on HTTPS for security and it currently implemented by Google, Facebook, Twitter etc.
Token-Based authentication
If you have only one portal, you can opt for the token-based authentication. JSON web tokens are mostly used. You can easily find the library or package in any popular programming language. So, you don't have to write code for generating or verifying the tokens. I will use this method. I found the popular library for Python Flask Project: Flask JWT Extended
Additional Resources
PS: I chose Token-Based authentication because there's minimal risk of data theft in my project as this portal only accessed through VPN only. So, you have to understand your user requirements to select the best suitable method for your application.
Keyul Patel is a 23-year-old computing student who enjoys eating out, relaxing and outdoor activities. He is helpful and loveable. He is currently at college studying computing. He is obsessed with programming.