auth0/auth0-react

Organization name still not supported 2.2.1

weisssean opened this issue · 2 comments

Checklist

Description

We are using v2.2.1 and organization name still does not seem to be supported although the documentation says it does.

When using the organization ID everything works, but when using the organization name it's returning invalid request:
http://localhost:3000/?error=invalid_request&error_description=authorization%20request%20parameter%20organization%20must%20be%20an%20organization%20id&state=T1N2Q3BSdi1wT1YwU1RjZGRRUWxadEhpVFVyMEppSDlqUGpZQVFmRTBMUg%3D%3D

Reproduction

Build a sample app:

<Auth0Provider
domain="yourclient.auth0.com"
clientId=""
authorizationParams={{
organization: "",
redirectUri: window.location.origin,
}}
<React.StrictMode>

</React.StrictMode>

Expected result: shows a popup for the organization
result:
http://localhost:3000/?error=invalid_request&error_description=authorization%20request%20parameter%20organization%20must%20be%20an%20organization%20id&state=T1N2Q3BSdi1wT1YwU1RjZGRRUWxadEhpVFVyMEppSDlqUGpZQVFmRTBMUg%3D%3D

Additional context

No response

auth0-react version

2.2.1

React version

18.2.0

Which browsers have you tested in?

Chrome

It looks like auth0 is returning an error indicating it expects an id (see error_description). That means your tenant isnt configured to accept organization names, and isn't something we can solve on the SDK side.

Can you try ensuring that it's enabled in your tenant and try again?

Not a bug: I found my issue, in your tenant advanced settings you need to enable this option. It will save a lot of people a lot of time if you add it to the documentation as it is required for this to work.