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
AuthenticationException constructor throws ClassCastException #55
Comments
Hi @SaikCaskey thanks for the report. Can you please tell us which auth0 endpoint you called and with what parameters exactly? |
the endpoint would be |
@SaikCaskey I can confirm that this is happening for |
Cheers @lbalmaceda, happy fixing! |
This will be available in the next release. 👍 |
The exact same issue ( Class Cast Exception ) occurs when trying to signup with the Java client of auth0 and the specified password fails to meet the complexity criteria. When the fixed Java client of auth0 would be available for download? Thanks |
@ofyaniv Are you talking about the https://github.com/auth0/auth0-java library? If so, please add the issue there to help us track it. We could add it sometime within the next 2 weeks. |
Great! Created auth0/auth0-java#109 Would it be possible to add support for creating a user through the Java client? Thanks |
@ofyaniv that's already supported https://github.com/auth0/auth0-java#create |
Great! In case the API fails due to the input of our users (weak password, etc..), we would like to present our users with the API message. Would it be possible to enhance the "create" API so it would return the password rules in case the specified password is too weak ( just like the "signup" API )? For example: Management Api create user: /api/v2/users SignUp Api: /dbconnections/signup |
@ofyaniv I guess the management API should be consistent and return the detailed error. I'll pass this request to the right team. |
Thank you for your kind response. The signup UI for our application includes multiple signup methods that are not using auth0. During signin - we are using auth0 UI for OAuth2.0 signin ( without showing the auth0 signup option ). So our signup process is using the "create user" API of auth0. How can we track this issue ( difference between create user response and signup response for weak password )? Thanks |
You should use the Authentication API from this SDK to sign up users. You don't require to show the Lock UI (that's a separate library that depends on this one). If you make the Regarding tracking the issue, unfortunately unless you create a ticket in https://support.auth0.com there's no way to track it. This is definitely not the place either as that depends on the API side and not an SDK. |
Thank you for the clarification. Our client is marked as "OIDC Conformant" at "Dashboard > Clients > Settings > Show advanced settings > OAuth > OIDC Conformant flag" and our authentication request is initiated with an audience parameter. We would like to use Auth0 signin UI dialog but without presenting the signup tab at that dialog. Is there any other way to hide the signup tab from Auth0 UI dialog? We are not familiar with the Lock UI. Thanks |
The "Auth0 UI dialog" is what we call Lock. To authenticate your users you'd generate an Authorize URL using the builder, which will take the user to the Universal Login (that's the auth0 hosted Lock). You can change how the web Lock behaves and displays in the Hosted Pages section of the dashboard. Read more about it here or even check out their repo. For example, I'd change the |
Thank you very much for your kind detailed clarification, professional support and patience. Your support is helpful and appreciated. We would follow your guidelines. Thanks |
This is the latest build I believe (v1.3.0).
When I allow the Auth0 validation to occur instead of my own, (specifically for passwords) I get an exception that I cannot handle without overriding that class. This seems like it shouldn't be happening, so let me know if it looks suspicious, however, I am seeing this issue on 1.0.0 as well as 1.3.0
Judging by where I get to whilst debugging, it looks like the offending line is (AuthenticationException 74):
this.description = (String) (this.values.containsKey(DESCRIPTION_KEY) ? this.values.get(DESCRIPTION_KEY) : this.values.get(ERROR_DESCRIPTION_KEY));
here is the stack trace:
java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to java.lang.String at com.auth0.android.request.internal.AuthenticationErrorBuilder.from(AuthenticationErrorBuilder.java:23) at com.auth0.android.request.internal.AuthenticationErrorBuilder.from(AuthenticationErrorBuilder.java:9) at com.auth0.android.request.internal.BaseRequest.parseUnsuccessfulResponse(BaseRequest.java:133) at com.auth0.android.request.internal.SimpleRequest.onResponse(SimpleRequest.java:65) at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:177) at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)
here's what's inside the values object:
values = {LinkedTreeMap@7884} size = 6
0 = {LinkedTreeMap$Node@7909} "name" -> "PasswordStrengthError"
1 = {LinkedTreeMap$Node@7910} "message" -> "Password is too weak"
2 = {LinkedTreeMap$Node@7911} "code" -> "invalid_password"
3 = {LinkedTreeMap$Node@7912} "description" -> " size = 2"
4 = {LinkedTreeMap$Node@7913} "policy" -> "* At least 6 characters in length"
5 = {LinkedTreeMap$Node@7914} "statusCode" -> "400.0"
Let me know if I can provide any more information or be any more help
The text was updated successfully, but these errors were encountered: