Skip to content
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

Authentication error message is different for Android and iOS. #317

Closed
solita-michalguspiel opened this issue Jun 8, 2022 · 1 comment
Closed

Comments

@solita-michalguspiel
Copy link

Hi! I have an application in which in case of Authentication error I show the prompt what went wrong.

Code in shared module :

fun sendEmailLink() {
        _userAuthState.value = Response.Empty
        settings.putString(CURRENT_EMAIL_KEY, _emailAddressInput.value)
        sharedScope.launch {
            useCases.sendEmailLink.invoke(_emailAddressInput.value).collect { response ->
                if (response == Response.Success(true)) startTimer()
                _sendLinkState.value = response
                println("Printing response in viewmodel : " + response)
                if(response is Response.Error) println("Error message : " + response.message)
            }
        }
    }
What is important in here are the println calls

I couldn't figure out why my iOS app shows such a weird error message, so I added println for debugging and tried to sign in with empty string on each platform

Output on Android :

   I/System.out: Printing response in viewmodel : Error(message=Given String is empty or null)
  I/System.out: Error message : Given String is empty or null

Output on iOS

printing response in viewmodel : Error(message=Error Domain=FIRAuthErrorDomain Code=17034 "An email address must be provided." UserInfo={NSLocalizedDescription=An email address must be provided., FIRAuthErrorUserInfoNameKey=ERROR_MISSING_EMAIL})
Error message : Error Domain=FIRAuthErrorDomain Code=17034 "An email address must be provided." UserInfo={NSLocalizedDescription=An email address must be provided., FIRAuthErrorUserInfoNameKey=ERROR_MISSING_EMAIL}
@walkingbrad
Copy link
Contributor

I fixed this in #297. I assume it will be available in the 1.6.2 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants