question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Coinbase invalid grant

See original GitHub issue

Issue

I’m trying to implement the coinbase oauth flow using the example provided:

const config =  {clientId: <COINBASE_CLIENT_ID>,
    clientSecret: <COINBASE_CLIENT_SECRET>,
    redirectUrl: '<app_name>://oauth',
    scopes: ['wallet:accounts:read'], 
    serviceConfiguration: {
      authorizationEndpoint: 'https://www.coinbase.com/oauth/authorize',
      tokenEndpoint: `https://api.coinbase.com/oauth/token`,
      revocationEndpoint: 'https://api.coinbase.com/oauth/revoke',
    },

I get the following error.

[Error: invalid_grant: The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.]

Environment

  • Your Identity Provider: coinbase
  • Platform that you’re experiencing the issue on: iOS
  • Are you using Expo? No

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
maithamcommented, Mar 1, 2020

I had to include usePKCE: false

0reactions
blankey1337commented, Jun 6, 2020

Seeing this same behavior. Not sure what the correct redirectUrl should be, but usePKCE works. Redirecting to my server is not ideal in my case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth invalid_grant error on coinbase using oauth2_client ...
hi in my case i have problems in the get token with duplicate oauth of coinbase with my app to text. error "invalid_grant"....
Read more >
Invalid Grant on Retrieving Access Token : r/CoinBase - Reddit
I'm using the OAuth application to sync coinbase account. ... The error says "The provided authorization grant is invalid, expired, revoked, ...
Read more >
Access tokens and refresh tokens - Coinbase Cloud
Coinbase uses an optional security feature of OAuth2 called refresh tokens. When you first authenticate, your app will be given an access_token and...
Read more >
OAuth invalid_grant error on coinbase using oauth2_client ...
[Solved]-OAuth invalid_grant error on coinbase using oauth2_client flutter package-Flutter ... I tested the auth flow manually using postman, which enabled me to ...
Read more >
"invalid_grant" error when requesting an OAuth Token
When I attempt to obtain an access token, I receive the error below. {"error":"invalid_grant", "error_description":"The provided access grant is invalid,
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found