Chris Mitchell
Chris Mitchell

Reputation: 68

How to sign out when using gapi.auth2.authorize

I am using gapi.auth2.authorize to authorize people in my Google Photos API app but I cannont find a why to unauthorize or disconnect them from the app. What I have noticed though is that there is no way of using an old access token so that the user doesn't need to authorize.

How can I make the access token invalid?

Is it correct that every time the API is used the user has to authorize?

Thanks

Upvotes: 1

Views: 179

Answers (1)

sahlouls
sahlouls

Reputation: 326

How can I make the access token invalid?

Not possible to invalidate an access token, it will expire after 1h

You can check documenttation here

Is it correct that every time the API is used the user has to authorize?

Nope, you should ask users to authorize only once, using a refresh token that you can keep in your back-end, thus allowing your app to content on on users behalf all the time, until they revoke permissions

Upvotes: 1

Related Questions