-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database Signup requires username even when optional #228
Comments
I am also seeing this issue, but the problem seems to be in the underlying REST API rather than the Python library itself - the library makes the request to Auth0 servers just fine but then gets a 400 response code back from the API server. |
Yes, that's correct -- it is a server-side API issue. The API does ignore the username param if it is not set on the API config itself, so it's more of a nuisance than anything else. But it will trip up people that don't investigate thoroughly, so the docs needs to be adjusted at least. |
The way the Python Requests API work is this. When you set one param to As mentioned above, connections that have the "Require username" option turned ON will fail when this endpoint is invoked without passing a valid username value. @dbinetti What would be a change in this SDK's docs to improve this? |
This isn't the behaviour I'm seeing - I definitely have the 'Require username' option turned off (I just checked) and I'm still seeing the request failing if I don't provide a username. |
@lbalmaceda Thanks for responding. If you're not able to replicate then perhaps I'll look a bit closer, but I think if you try it yourself you'll see the behavior I described in my original post. Check out Line 11 and then the response on Line 17. |
I just verified the docs and the code and it seems the behavior I explained above only applies to query parameters, not params that conform the body. Do you want to send a PR to fix these changes? |
I’ll give it a shot
…On Jul 6, 2020, 15:16 -0700, Luciano Balmaceda ***@***.***>, wrote:
I just verified the docs and the code and it seems the behavior I explained above only applies to query parameters, not params that conform the body.
The fix would be checking for the parameter presence before adding the optional values to the data/body dictionary. This would apply to most of the POST requests on the SDK, although there are some that should still accept null.
Do you want to send a PR to fix these changes?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@dbinetti Thanks! I actually fixed this in the last hour and will be posting a PR soon. |
@lbalmaceda thanks very much! |
Awesome —. Sooooooooooooo fast
…On Jul 7, 2020, 12:32 -0700, Feroz Salam ***@***.***>, wrote:
@lbalmaceda thanks very much!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Description
When using Authentication>Database>Signup
If my database does not require a username, then allow username=None.
Reproduction
Environment
auth0-python 3.11.0
django 3.0.8
Mac, etc.
The text was updated successfully, but these errors were encountered: