Skip to content

Commit e50607e

Browse files
committed
fix: add token_type and client_id to the revoke endpoint
1 parent 9a88b1d commit e50607e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/state/KindeProvider.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,25 +239,27 @@ export const KindeProvider = ({
239239
const accessToken = tokens?.accessToken;
240240
const refreshToken = tokens?.refreshToken;
241241

242-
await Promise.all([
243-
fetch(`${domain}/logout`),
242+
await fetch(`${domain}/logout`),
244243
refreshToken &&
245244
fetch(`${domain}/oauth2/revoke`, {
246245
method: "POST",
247246
body: JSON.stringify({
248247
token: refreshToken,
248+
client_id: clientId,
249+
token_type: "refresh_token",
249250
}),
250251
headers: {
251252
"Content-Type": "application/json",
252253
Authorization: `Bearer ${accessToken}`,
253254
},
254255
}),
255-
]);
256256
if (accessToken) {
257257
await fetch(`${domain}/oauth2/revoke`, {
258258
method: "POST",
259259
body: JSON.stringify({
260260
token: accessToken,
261+
client_id: clientId,
262+
token_type: "access_token",
261263
}),
262264
headers: {
263265
"Content-Type": "application/json",

0 commit comments

Comments
 (0)