Docs

revokeSignInToken()

Revokes a pending sign-in token.

function revokeSignInToken: (signInTokenId: string) => Promise<SignInToken>;
  • Name
    signInTokenId
    Type
    string
    Description

    The ID of the sign-in token to revoke.

const signInTokenId = 'sit_123';

const response = await clerkClient.signInTokens.revokeSignInToken(
  signInTokenId
);

console.log(response);
/*
_SignInToken {
  id: 'sit_123',
  userId: 'user_123',
  token: undefined,
  status: 'revoked',
  url: undefined,
  createdAt: 1719952616214,
  updatedAt: 1719953040703
}
*/

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint POST/sign_in_tokens/{sign_in_token_id}/revoke. See the BAPI reference for more details.

Feedback

What did you think of this content?