Is it better to implement Social Login/Authentication in the frontend (React) of an application or backend (FastAPI)

I am building a full-stack application using React for the frontend and FastAPI for the backend with PostgreSQL database. I am aware the most answers for my question have been "do both" but to me that is quite vague an answer. To be more specific with an example, I can have two ways of adding the Google authentication method in my application,

  1. Using FastAPI and this article to simply provide the frontend with the google auth button

  2. Using React and this package to implement social login in the frontend but still do some form of authentication with tokens in the backend.

My question is, which option is easier to implement and more secure.

Source: React – Stack Overflow

November 21, 2021
Category : News
Tags: authentication | fastapi | oauth-2.0 | reactjs | social-authentication

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.