auth0/Lock.swift

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

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
  1. Trigger lock authentication flow
  2. Go to Sign Up (on database connection where username is required)
  3. Enter a username that already exists, and other information correctly
  4. Tap Sign Up
  5. 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.

stale commented

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! 🙇‍♂️