I have a typical web application and I'd like to let users register using their google account. My front-end application is written in ionic/angular so I use a plugin (https://github.com/CodetrixStudio/CapacitorGoogleAuth). I believe that it uses "oauth2 implicit flow" (correct me if I'm wrong).
I've configured application on google developer console (web application) and I'm able to use my account to get access token and account info.
My problem is that I'm not sure if I'm doing it right. Because:
- There is something called "client secret" on the google console but I have no clue how to use it or if it applies to this flow (I think that not but I'm not sure)
- What I plan to do next is to send the access token to my back-end, then verify the token. I hoped that process of token verification can be "offline". But it turns out that I need to send a request to google. So my question is: Isn't there a way to sing the token using "client secret" so that I could verify the token on the back-end without bothering google?
- I don't want to reinvent the wheel but cannot find any example of user registration. Should I just verify token, grasp email address and add it to my DB? (Do I need something else from oauth response?)