Unhelpful fallback error message on signup with existing username
rfdearborn opened this issue · 4 comments
Description
On signup with an already-in-use username, web signup returns "THE USERNAME ALREADY EXISTS." but native iOS lock only shows the fallback "WE'RE SORRY, SOMETHING WENT WRONG WHEN ATTEMPTING TO LOG IN."
Prerequisites
- [x ] Did you check the documentation? (https://auth0.com/docs/libraries/lock-ios/v2)
- [x ] Did you check the Auth0 Community?
- [x ] Are you reporting this to the correct repository?
- [x ] Are there any related or duplicate Issues or PRs for this issue?
Yes: #134
Environment
Please provide the following:
- Lock version 2.9
- iOS version 12.1
- If using Carthage or CocoaPods, please include your Cartfile or Podfile
target 'Challe' use_frameworks! pod 'Auth0', '~> 1.13' ... pod 'Lock', '~> 2.9' ...
- Xcode version 10.1
- Trigger lock authentication flow
- Go to Sign Up (on database connection where username is required)
- Enter a username that already exists, and other information correctly
- Tap Sign Up
- Receive error message "WE'RE SORRY, SOMETHING WENT WRONG WHEN ATTEMPTING TO LOG IN."
same problem here: i want to show a user a specific error message, for example if he tries to log in with an email address, which has not been verified yet. I only get "WE'RE SORRY, SOMETHING WENT WRONG WHEN ATTEMPTING TO LOG IN.", in the log however i see the correct error message.
Hey, our backend dev found a solution:
Instead of creating an error message with
return callback('Error message XYZ');
he now does this
return callback(new UnauthorizedError('Error message XYZ'));
Now I get the correct error messages in Lock for iOS.
Agree that messaging could be better and consistent with web for this, I'll raise into the backlog.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇♂️