isaacsanders / omniauth-stripe-connect

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

Do not pass redirect_uri by default #16

Closed metcalf closed 10 years ago

metcalf commented 10 years ago

Stripe requires whitelisting specific redirect_uri values. If you're only going to use the default anyway, it's better not to pass it to avoid conflicts.

Currently, Stripe allows any value for redirect_uri but ignores it. In the future this behavior will be deprecated and passing a redirect_uri parameter that does not exactly match the one in the dashboard will cause an error.

Note this commit introduces rspec testing to match the OmniAuth gems.

sbounmy commented 1 year ago

This could help people who want to send redirect_uri and avoid being redirected to default:

Devise.setup do |config|
  config.omniauth :stripe_connect,
                  Rails.application.credentials.stripe.client_id,
                  Rails.application.credentials.stripe.secret_key,
                  scope: "read_write",
                  callback_path: '/users/auth/stripe/callback'
end