#caine-connect-OAuth
1 messages · Page 1 of 1 (latest)
or perhaps it's only working because i'm in test mode?
Hi there 👋 this was written because we made a change where newer accounts will only be able to connect to one platform with the read_write scope. If a second platform attempts to connect then a new account will be created rather than the existing one being connected with multiple platforms.
does this affect anything in my use case? right now the user oauths via discord, twitter, facebook, etc. to their user account to login
they then can oauth with stripe to link to that account using: ```https://connect.stripe.com/oauth/authorize?response_type=code&client_id={{CLIENT_ID}}&scope=read_write&redirect_uri=https://sub2.example.com
and it returns an account id which i'm store to a db for that user for future charges
Are you relying on being able to access existing data in the connected account?
no I don't want to implement this I want to advise them to login to stripe manually to see all charges\account data
i merely want their stripe account id to process charges on their behalf via the website
if I need to see detailed data I will do the same
Probably not a concern then. The only thing worth noting, is that if the account is newer and already connected to another platform with the read_write scope, then the user will likely end up with a brand new account that will be connected to your platform rather than their existing one.
oh that's fine it doesn't matter
long as they can receive the funds and I can process charges
Should be fine then 😄
one other question I have is the disconnecting of an account this could break things if someone tries to check out
are they able to do this without disconnecting via the website?
can stripe make a callback to tell me some how?
POST https://connect.stripe.com/oauth/deauthorize
Used for revoking access to an account.
Request
Make this call using your secret API key as an Authorization header.
// Set your secret key. Remember to switch to your live secret key in production.
// See your keys here: https://dashboard.stripe.com/apikeys
\Stripe\Stripe::setApiKey('sk_test_51K8AulCB7bq3UY0Tbs5jIIm7QvENBxNvGSSZyWJCbWRBzUXYfXbuT4jPtcLUwfJzmExp8ZNcXPtT3kAXP7n32Y2900tZuGa3zb');
\Stripe\OAuth::deauthorize([
'client_id' => 'ca_FkyHCg7X8mlvCUdMDao4mMxagUfhIwXb',
'stripe_user_id' => 'acct_qKt51jDJkJTPHy',
]);```
that's simple to implement on the website if they willingly no longer want to be connected, but I wasn't sure if they could disconnect without me knowing
You can build a Connect webhook to listen for account.application.deauthorized events so you know whenever someone deauthorizes your application:
https://stripe.com/docs/api/events/types#event_types-account.application.deauthorized
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.