Skip to content

revokeRefreshTokens()

revokeRefreshTokens(uid): Promise<void>

Defined in: CloudFireAuth.ts:395

Revokes all refresh tokens for an existing user.

This API will update the user's UserRecord.tokensValidAfterTime to the current UTC. It is important that the server on which this is called has its clock set correctly and synchronized.

While this will revoke all sessions for a specified user and disable any new ID tokens for existing sessions from getting minted, existing ID tokens may remain active until their natural expiration (one hour). To verify that ID tokens are revoked, use CloudFireAuth.verifyIdToken where checkRevoked is set to true.

Parameters

uid

string

The uid corresponding to the user whose refresh tokens are to be revoked.

Returns

Promise<void>

An empty promise fulfilled once the user's refresh tokens have been revoked.