3

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 https://medium.com/data-rebels/fastapi-google-as-an-external-authentication-provider-3a527672cf33

  2. Using React and this package https://www.npmjs.com/package/react-social-login 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. Thanks

Alyan Qureshi
  • 111
  • 1
  • 5
  • That depends entirely on your use case. What do you need the login / tokens for? – luk2302 Nov 21 '21 at 07:41
  • Well it's a simple website that I want authentication for and I wanted to add social login/auth since it is the norm nowadays. The login/tokens will just be used for user authentication and OAuth2 flows with JWTs. – Alyan Qureshi Nov 21 '21 at 07:48

0 Answers0