-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roblox provider token revoke error #197
Comments
Can you try manually sending the revocation request and sharing the response body? The current code should work if the provider returns no response body or if it returns an empty json object. |
I was experiencing the same error with a custom provider. If it's the same issue, this can be fixed with #199 |
Yes, I use bun as well.
Took me a while but here you go: Code: const base64Credentials = Buffer.from(`${ROBLOX_CLIENT_ID}:${ROBLOX_CLIENT_SECRET}`).toString('base64');
const response = await fetch("https://apis.roblox.com/oauth/v1/token/revoke", {
method: "POST",
body: new URLSearchParams({
token: session.refreshToken,
}),
headers: {
"Authorization": `Basic ${base64Credentials}`,
"Content-Type": "application/x-www-form-urlencoded"
},
}); console.log(response, "\nBody:", await response.text()) Response:
|
I run into this error every time I try to revoke the token:
Error: Failed to parse response body
When reading the Roblox.ts provider file, I have found out it uses a function from Requests.ts where it tries to get the json body of the response.
Problem is, however, that Roblox does not return any body data as a response - see documentation.
Could this be handled somehow?
The text was updated successfully, but these errors were encountered: