How to use REST API to logout a current user from the Google Cloud Identity Platform?

Viewed 304

The documentation explains how to use REST API to perform common user operations, such as signing in users.

But it doesn't include, how to logout the current user. How it can be done?

2 Answers

If you want to immediately sign out another user then that cannot be done.
However, if you remove their role, revoke their permission or perform any action that will refresh their token, then they will be denied on the next action they perform, e.g. when they refresh the website, send a form, execute Cloud SDK command or make an API request.

Cloud Identity Platform is based on firebase auth solution. The authentication is managed user-side and not server side. (the access token and the refresh token are kept in the browser memory). Therefore, you can't logout a user with a Rest API call.

However, you can redirect your user on a page that clean their browser credential and then be disconnected.

Related