You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coinbase app API may have changed. It is not sending the correct content type in the response when sending request to https://api.coinbase.com/v2/user . Content-Type appears to be: 'content-type': 'application/protobuf'. making the call to .json() give error as follows:
$a851b4"... is not valid JSON
at JSON.parse ()
at parseJSONFromBytes (node:internal/deps/undici/undici:5731:19)
at successSteps (node:internal/deps/undici/undici:5712:27)
at fullyReadBody (node:internal/deps/undici/undici:4609:9)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async consumeBody (node:internal/deps/undici/undici:5721:7)
.....
How to reproduce
Clone the repo and run the application with the credentials from coinbase and prisma DB url string.
Provider type
Coinbase
Environment
Reproduction URL
https://github.com/wilkinnovo/auth-example
Describe the issue
Coinbase app API may have changed. It is not sending the correct content type in the response when sending request to https://api.coinbase.com/v2/user . Content-Type appears to be: 'content-type': 'application/protobuf'. making the call to .json() give error as follows:
[auth][error] CallbackRouteError: Read more at https://errors.authjs.dev#callbackrouteerror
[auth][cause]: SyntaxError: Unexpected token '�', "
�
$a851b4"... is not valid JSON
at JSON.parse ()
at parseJSONFromBytes (node:internal/deps/undici/undici:5731:19)
at successSteps (node:internal/deps/undici/undici:5712:27)
at fullyReadBody (node:internal/deps/undici/undici:4609:9)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async consumeBody (node:internal/deps/undici/undici:5721:7)
.....
How to reproduce
Clone the repo and run the application with the credentials from coinbase and prisma DB url string.
Expected behavior
Respond with JSON data as follows:
curl https://api.coinbase.com/v2/user /
-H 'Authorization: Bearer 6915ab99857fec1e6f2f6c078583756d0c09d7207750baea28dfbc3d4b0f2cb80'
Example response:
{
"data": {
"id": "9da7a204-544e-5fd1-9a12-61176c5d4cd8",
"name": "User One",
"username": "user1",
"profile_location": null,
"profile_bio": null,
"profile_url": "https://coinbase.com/user1",
"avatar_url": "https://images.coinbase.com/avatar?h=vR%2FY8igBoPwuwGren5JMwvDNGpURAY%2F0nRIOgH%2FY2Qh%2BQ6nomR3qusA%2Bh6o2%0Af9rH&s=128",
"resource": "user",
"resource_path": "/v2/user"
}
}
The text was updated successfully, but these errors were encountered: