#Francois-Connect

1 messages · Page 1 of 1 (latest)

tender rose
#

Hi there, let me take a look

warm nebula
#

Hi Jack

#

thank you

tender rose
#

This account was disconnected from platform because the OAuth Token was consumed twice

warm nebula
#

mmmh

#

ok

#

so initial authorization is priorized ?

tender rose
#

You should make sure that the OAuth token is consumed once only

warm nebula
#

App 1 Token
App 2 Token asked => denied

#

from the dashboad, is there a link to list who is consuming the token (on the Standard Dashboa part)

#

?

tender rose
#

The token is for the platform to consume, you can check you code and see how many POST https://connect.stripe.com/oauth/token requests are made

warm nebula
#

ok but this is only possible when having access on this account. I'm trying to find a way to tell our customer : click here, and remove this access if you want to use our application

#

because it looks like our user gives access to the application, and it's automaticaly revoked

tender rose
warm nebula
#

ok but there is nothing on this page to see if the code is already used

fading loom
#

yep, there's no direct logs for this, you should check logs in your own code

#

i.e. add logs where you call oauth.tokens.create or the equivalent code in your integration as you're likely hitting it twice for some reason like if the user refreshes the page or something.

warm nebula
#

mmmh

fading loom
#

overall I suggest not suing OAuth unless you are specifically building an extension that needs to connect to existing accounts

warm nebula
#

that's what's happen. It's for existing accounts

fading loom
warm nebula
#

I'm wondering why Oauth is called twice. You're sure it's from our application ?

fading loom
#

yes

#

this is a really common issue that every platform building OAuth runs into and you need to find a soluton for. For example keep a small cache of ac_xxx access tokens and check them before submitting

warm nebula
#

ok but it's only on redirection page right ?

#

because on our side, this url 'https://connect.stripe.com/oauth/authorize' . '?' . http_build_query($queryData) is only available when the customer is not connected as Standard account

fading loom
#

if you add logs it's usually pretty obvious what's happening like the user refreshes their browser on that page, or you persist the query parameters to a different page, or you just run the code twice for some reason, hard for us to say but you can debug it.