I successfully implemented login with google with the example codes provided by google.
However, I'm not sure of how I should use this 'backend-server authentication' thingy.
which is provided in : https://developers.google.com/identity/sign-in/web/backend-auth
I'm developing a website that requires google login and google drive, as the program flows:
- User Logins to the website using google account
- The User writes some text
- The User saves(uploads) to the user's google drive
Before I implement the google drive API, I think I need to handle with the google login system, but I'm not sure how to do it.
Currently, my website goes as 1. User logs in / 2. User logs out / 3. Then the web does not ask the google account, just logs the previous user inside.
Does 'backend-server authentication' gives an answer to my question below?
I understand that it is the same issue as this : How to Logout of an Application Where I Used OAuth2 To Login With Google?. I understood the meaning of the answer, but I cannot find a way to implement to just "log out from the app, not google."
So, to wrap it up, my question will be 2;
- How do I use backend-server authentication? (Specifically, the token verifying point)
- How do I log out of my web app, not google? and is it related to question 1? (Specifically, if a user logs off from the web app, then another user should be able to log in, by entering their id and password)
From this section of the documentation:
attach this link in your views. this will sign you out of google.