I am trying to implement google authentication for my website, it is React front end and Spring Boot REST back end.
For my React app I've found a library that provides a Google Login button, in which I can specify 'client-id' of my app, registered in Google developer's console and the rest (redirection of the user to google authentication page, retrieval of access token/id token) is done by this library.
Now I want to send this access token to my back-end, use it to make a request to google, to verify that this front-end user is a real google user, who correctly authenticated and get this user's data by showing this access token to google (i only want email/name/sub, which is users unique Google id). Am I looking for some library to exchange this google access token for user data ?
I'm also confused by the fact that all the oauth tutorials say that when user authenticates on google page, my app would receive an Authorization Code but my front end receives, as I said, acces token and id token. Is it because of the library I'm using ? https://www.npmjs.com/package/react-google-login this is the library
This is the data that comes to my client app when user autheneticates on google page console.log(response) in browser
Thanks