isaacsanders / omniauth-stripe-connect

Stripe Connect OAuth2 Strategy for OmniAuth 1.0
MIT License
130 stars 74 forks source link

Suggested capabilities and stripe_express callback url #62

Closed jongaegler closed 2 years ago

jongaegler commented 3 years ago

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

isaacsanders commented 3 years ago

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

thomasgallagher commented 3 years ago

https://github.com/Kindful/omniauth-stripe-connect/pull/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)>'