Ready to post? First, try searching for your answer.
Hi, I am configuring Auth0 to work with a rails application using the SDK and the quick start guide here. I am trying to pass an organisation id so that I can load an organisation-specific login page using the code below:
def index
auth0_login_url = "/auth/auth0?organization=my_org_id"
render inline: <<-HTML
<%= button_to '#{auth0_login_url}', method: :post, data: { turbo: false } do %>
Login
<% end %>
HTML
end
When I click the login page I get the following error:
OmniAuth::Strategies::OAuth2::CallbackError
invalid_request | parameter organization is not allowed for this client
What is the correct way of passing the organization id?
Inside the application that you are trying to pass the organization parameter to, do you have Organizations enabled? If yes, do you have them set to Business Users or to Both? Regardless of which one it is, it should be able to take in the parameter. Also, make sure you are not trying to pass the organization parameter to an M2M application.
Otherwise, if your applications has Organizations configured, you should be able to pass the org_id as you do above. As an example, if you want to have the user directly log into an organization, you would pass the org_id inside the /authorize call as below: