React application should directly communicate with cognito or better to have backend Service in between

Viewed 46

My front end application is in react JS. And my APIs built using serverless framework are authorized using AWS cognito. My question is which is better option?

  1. Use aws-amplify in react JS and communicate with cognito directly.
  2. Have a backend serivice in node JS which will actully communicate with cognito.

Better option and why?

0 Answers
Related