Skip to content

Catch all errors from sign in - improvement for signInFailure  #1074

Open
@Boardtale

Description

@Boardtale

Need:

I require for email + pwd to verify emails.
As far as I know, I can't prevent or redirect flow after user first time creates account. So the error is sent from my blocking function: 'please verify email'.
That does not look good when user tries to log in with unverfied email:
image
I want to catch that error and show proper error popup for the users.

I am using 'signInFailure' but it's not triggered.. I think ever :P I don't know where it's triggered but not if I get any forbidden from my blocking function

So I'd like to solve it somehow. I see few paths but neither is possible - afaik - with firebaseUI. Unless I'm gonna dirty trick it and break encapsulation.

  1. Stop auto sign in after creation of the account for email. I could redirect user in such case to dedicated page where I ask him to verify account. Also I need to be able to send that email there! So it's important for me to get handler
  2. Ignore the flow, but be able to catch all errors. Some kind of generic catch for all that thing.

EDIT:

I guess I could do this manually on my own backend, after login, check if verified email and then redirect them also logging them out. But that's many additional actions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions