Skip to content
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

Suggested capabilities and stripe_express callback url #62

Closed

Conversation

jongaegler
Copy link

@jongaegler jongaegler commented Sep 22, 2020

Adds two new features, one is to auth to stripe_express.

Another is to add params to suggest capabilities on org signup shown here https://dashboard.stripe.com/connect-update

@jongaegler jongaegler changed the title Suggested capabilities Suggested capabilities and stripe_connect callback url Sep 22, 2020
@jongaegler jongaegler changed the title Suggested capabilities and stripe_connect callback url Suggested capabilities and stripe_express callback url Sep 22, 2020
@isaacsanders
Copy link
Owner

@todddickerson Do you mind reviewing this PR? I think this would fix your issue.

@thomasgallagher
Copy link

thomasgallagher commented Apr 23, 2021

Kindful#2

Extended this PR to allow the user to override the global stripe_express OmniAuth param at the point of redirection to allow projects to mix and match between Stripe Connect Standard (free) and Express (paid) accounts. Also updated the docs.

Please consider merging both into the main repo.

NB. I also spotted 2 specs that were failing that I didn't have time to look at:

Failures:

  1) OmniAuth::Strategies::StripeConnect#authorize_params should not include redirect_uri by default
     Failure/Error: expect(instance.authorize_params[:redirect_uri]).to be_nil
     
       expected: nil
            got: "https://foo.com//auth/stripe_connect/callback"
     # ./spec/omniauth/strategies/stripe_connect_spec.rb:39:in `block (3 levels) in <top (required)>'

  2) OmniAuth::Strategies::StripeConnect#token_params should not include redirect_uri by default
     Failure/Error: expect(instance.token_params[:redirect_uri]).to be_nil
     
       expected: nil
            got: "https://foo.com//auth/stripe_connect/callback"
     # ./spec/omniauth/strategies/stripe_connect_spec.rb:71:in `block (3 levels) in <top (required)>'

Copy link
Owner

@isaacsanders isaacsanders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't clear that, based on the OmniAuth/OAuth2 library docs, that either of these are necessary for the task you wish to do. Changing the client_options/site value upon configuring your application should be sufficient for changing to the desired endpoint. Additionally, the suggested_capabilities should be listed in the configuration for authorize_params.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants