Skip to content

Commit b1acd9a

Browse files
author
Kadi Kraman
committed
Renamie includeBasicAuthorization to includeBasicAuth
1 parent 730d539 commit b1acd9a

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ const config = {
177177
};
178178

179179
const result = await revoke(config, {
180-
tokenToRevoke: `<TOKEN_TO_REVOKE>`
180+
tokenToRevoke: `<TOKEN_TO_REVOKE>`,
181+
includeBasicAuth: true,
182+
sendClientId: true
181183
});
182184
```
183185

docs/config-examples/fitbit.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const refreshedState = await refresh(config, {
3030

3131
// Revoke token
3232
await revoke(config, {
33-
tokenToRevoke: refreshedState.refreshToken
33+
tokenToRevoke: refreshedState.refreshToken,
34+
includeBasicAuth: true
3435
});
3536
```

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export const refresh = (
231231

232232
export const revoke = async (
233233
{ clientId, issuer, serviceConfiguration, clientSecret },
234-
{ tokenToRevoke, sendClientId = false, includeBasicAuthorization = false }
234+
{ tokenToRevoke, sendClientId = false, includeBasicAuth = false }
235235
) => {
236236
invariant(tokenToRevoke, 'Please include the token to revoke');
237237
validateClientId(clientId);
@@ -255,7 +255,7 @@ export const revoke = async (
255255
const headers = {
256256
'Content-Type': 'application/x-www-form-urlencoded',
257257
};
258-
if (includeBasicAuthorization) {
258+
if (includeBasicAuth) {
259259
headers.Authorization = `Basic ${base64.encode(`${clientId}:${clientSecret}`)}`;
260260
}
261261
/**

0 commit comments

Comments
 (0)