1

我正在使用 Omniauth Stripe-Connect gem,我想添加一个范围,但文档没有涵盖这一点。这是我现在正在尝试的,但不包括scopeand参数:stripe-landing

Rails.application.config.middleware.use OmniAuth::Builder do
     provider :stripe_connect, ENV['STRIPE_CONNECT_CLIENT_ID'], ENV['STRIPE_SECRET'], { :scope => 'read_write', :stripe_landing => 'register' }
end

宝石/策略: https ://github.com/isaacsanders/omniauth-stripe-connect

4

1 回答 1

1

使用上面的 gem,添加 scope 和 stripe_landing 是Builder行不通的。

而是使用这个:

Rails.application.config.middleware.use OmniAuth::Builder do
    provider :stripe_connect, ENV['STRIPE_CONNECT_CLIENT_ID'], ENV['STRIPE_SECRET']
end

然后在您的 Omniauth 链接中添加参数:

<a href='http://exampleapp.com/auth/stripe_connect?scope=read_write&stripe_landing=register'>Connect With Stripe</a>
于 2013-04-21T03:19:25.960 回答