node-red / node-red/node-red.github.io

API docs for revoke do not work if token has `+` character

Open
#298 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
118
Forks
161
Avg merge
8h 18m
Merged PRs (30d)
4

Description

REF: https://discourse.nodered.org/t/node-red-token-revokation/69881/4?u=steve-mcl

The example to revoke shown here > https://nodered.org/docs/api/admin/oauth#revoking-the-token < fails to logout a user if the data token contains a + character.

Assuming nothing has changed other than being lucky enough to get a token with a + char then we should probably update the example to use --data-urlencode

Also, make clear that the data part token is the token of the user to log out.

e.g.

curl --data-urlencode 'token=USER_TO_LOG_OUT_SECRET_TOKEN' -H "Authorization: Bearer ANY_USER_SECRET_TOKEN" http://localhost:1880/auth/revoke

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the linked Admin API documentation section on revoking the token and review the current curl example. Update the example to encode token data safely and clarify that the data token is the user token being logged out; done means the documented command handles tokens containing '+'.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.