Feng's Notes Isn't coding fun?
Posts with the tag Oauth:

Social login without a (dedicated) backend server

Login through third parties including Google, Github etc has been an essential requirement for most web applications. The underlying of this process is oauth authentication. The following diagram from Google shows the process of oauth authentication.

oauth

As you can see, it is a bi-directional communication between the app and the oauth server. The app needs to handle the callback. This is usually done by a backend server. However, you don’t have to have a dedicated backend server for this if what you want is just to get the user’s information from the third party. There are several cloud services that can help you with this. Among them, Firebase is the most popular one, while supabase is a new comer. They both provide a backend service that can handle the callback and the database to store the user’s information while you can interact with them through their APIs. I have used both and would like to discuss in this post the pros and cons of these two services.