auth0 ruby gem → omniauth-auth0
This is a clarification of usage, I need to send an extra param in the request to auth0 which will be used in a custom rule. For example if the new param is called ‘foobar’ is this the correct way to pass it to auth0:
Rails.application.config.middleware.use OmniAuth::Builder do
provider(
:auth0,
ENV['AUTH0_CLIENT_ID'],
ENV['AUTH0_CLIENT_SECRET'],
ENV['AUTH0_DOMAIN'] ,
callback_path: '/auth/auth0/callback',
provider_ignores_state: true,
authorize_params: {
scope: 'openid email profile',
foobar: 'myvalue'
}
)
end
Button:
<%= button_to 'Login','auth/auth0', method: :post, class: 'btn btn-primary btn-lg' %>