Revoke Access Token
To enforce security in your application, you can use the revoke access token feature to revoke a user's access token. This functionality comes in handy when you want a user to get a new ID token before they can perform the next set of operations.
Here is how it can be used:
Implementation
Call the auth.revokeAccessToken()
method to revoke a particular user's access as seen below:
After creating the FirebaseAuth
instance auth
, access its .revokeAccessToken()
method to trigger the revocation of the current user's ID token.
This would log them out of the application to enforce another login before subsequent operations can be done.
Last updated