@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
67 lines (35 loc) • 1.21 kB
Markdown
---
lang: en
title: 'API docs: authentication.tokenservice.revoketoken'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/authentication
permalink: /doc/en/lb4/apidocs.authentication.tokenservice.revoketoken.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/authentication](./authentication.md) > [TokenService](./authentication.tokenservice.md) > [revokeToken](./authentication.tokenservice.revoketoken.md)
## TokenService.revokeToken() method
Revokes a given token (if supported by token system)
**Signature:**
```typescript
revokeToken?(token: string): Promise<boolean>;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
token
</td><td markdown="1">
string
</td><td markdown="1">
The token/secret which should be revoked/invalidated.
</td></tr>
</tbody></table>
**Returns:**
Promise<boolean>
true, if the given token was invalidated.