Skip to content

How to revoke token? #1010

Answered by neet
42gb asked this question in Q&A
Nov 12, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hi @42gb, thank you for posting a question.

As you pointed out, we didn't supportPOST /oauth/revoke API becuase Masto.js has long been dedicated for the REST and WebSocket API and has just introduced OAuth API support as of v6.0.0.

I've just released v6.5.0 with token revocation support #1011, and you can use it as follows:

import { createOAuthClient } from "masto";

const oauth = createOAuthClient({ ... });

await oauth.revoke({
  clientId: "...",
  clientSecret: "...",
  token: "...",
})

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@42gb
Comment options

@neet
Comment options

neet Nov 14, 2023
Maintainer

@42gb
Comment options

Answer selected by 42gb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants