Closed
Description
Checklist
- I have looked into the README and have not found a suitable solution or answer.
- I have looked into the documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have upgraded to the latest version of this SDK and the issue still persists.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
I'm creating a user programatically with the following code:
auth0, err := authentication.New(context.Background(), "<redacted>")
resp, err := auth0.Database.Signup(context.Background(), database.SignupRequest{
ClientID: "<redacted>"
Email: "<redacted>",
Password: "password",
Connection: "Username-Password-Authentication",
})
this returns the error: 400 Bad Request: failed to decode json error response payload: json: cannot unmarshal object into Go struct field authErrorWrapper.description of type string
Manually trying the operation via HTTP shows the real error:
Response body: {"name":"PasswordStrengthError","message":"Password is too weak","code":"invalid_password","description":{"rules":[{"message":"At least %d characters in length","format":[8],"code":"lengthAtLeast","verified":true},{"message":"Contain at least %d of the following %d types of characters:","code":"containsAtLeast","format":[3,4],"items":[{"message":"lower case letters (a-z)","code":"lowerCase","verified":true},{"message":"upper case letters (A-Z)","code":"upperCase","verified":false},{"message":"numbers (i.e. 0-9)","code":"numbers","verified":false},{"message":"special characters (e.g. !@#$%^&*)","code":"specialCharacters","verified":true}],"verified":false}],"verified":false},"policy":"* At least 8 characters in length\n* Contain at least 3 of the following 4 types of characters:\n * lower case letters (a-z)\n * upper case letters (A-Z)\n * numbers (i.e. 0-9)\n * special characters (e.g. !@#$%^&*)","statusCode":400}
I think this is a bug
Expectation
An error message that I can use to debug the issue
Reproduction
auth0, err := authentication.New(context.Background(), "<redacted>")
resp, err := auth0.Database.Signup(context.Background(), database.SignupRequest{
ClientID: "<redacted>"
Email: "<redacted>",
Password: "password",
Connection: "Username-Password-Authentication",
})
Auth0 Go SDK version
v1.4.0