firebase / firebaseui-web

FirebaseUI is an open-source JavaScript library for Web that provides simple, customizable UI bindings on top of Firebase SDKs to eliminate boilerplate code and promote best practices.
https://firebase.google.com/
Apache License 2.0
4.58k stars 1.06k forks source link

UI Error handling not the same during sign up and sign in #866

Open MrVentzi opened 3 years ago

MrVentzi commented 3 years ago

[REQUIRED] Describe your environment

[REQUIRED] Describe the problem

Steps to reproduce:

  1. Create a firebase ui app
  2. Create a blocking cloud function - e.g. check if the email is verified, and throw error if not
  3. Throw error during login with custom message

throw new gcipCloudFunctions.https.HttpsError('permission-denied',Please verify your email before proceeding.);

Tried the process in 2 flows. During sign up:

  1. Sign up with new user
  2. Error is shown as expected image console error here: [ 16.665s] [firebaseui] setAccountInfo: {"code":"auth/internal-error","message":"Please verify your email before proceeding."}

During sign in:

  1. Sign in with the new user
  2. Error is not handled correctly image console error here: [104.998s] [firebaseui] verifyPassword: HTTP Cloud Function returned an error: {"error":{"code":403,"message":"Please verify your email before proceeding.","status":"PERMISSION_DENIED"}}

Let me know if you need anything else.

Would appreciate if you have a workaround to fix the UI in the meantime?

xil222 commented 3 years ago

filed a internal bug to track b/194807579 will fix it soon