Skip to main content

revokeRefreshToken

talawa-apiDocs


talawa-api / utilities/auth / revokeRefreshToken

Function: revokeRefreshToken()

> revokeRefreshToken(userId): Promise<void>

Revokes the refresh token for a user by removing the token from the user's profile. This function searches for the user by their ID and unsets the token field in the user's document.

Parameters

userId: string

The ID of the user whose refresh token is to be revoked

Returns

Promise<void>

A promise that resolves when the token has been revoked

Defined in

src/utilities/auth.ts:78