Spring Boot OAuth2 Pipeline

Viewed 38

I’m trying to create a secured api with Spring Boot but I’m confused on a few things. If anyone has any clarification or resources to point me to that’d be great.

Currently I have a database with two tables, one that contains users, and one that holds something like a date. Each date has a reference to the primary id of the user, and that is how they are connected.

I want to use OAuth2 to authenticate my user with Google, and authorize them to access only the dates that have the id of my user. However I don’t understand:

  • How to make this authentication return a token, which I can pass to my api to access the specific dates that belong to that user.
  • How to have the api link this token (I assume it would be different every login) back to my database of dates, only retrieving the dates that belong to the specified user.
  • Where does my front end (React) fit into this process?
0 Answers
Related