Open
Description
[READ] Step 1: Are you in the right place?
I think so.
[REQUIRED] Step 2: Describe your environment
- Firebase Component: Auth
- Component version: 21.3
[REQUIRED] Step 3: Describe the problem
When the signup is blocked by the cloud function it returns a rather generic FirebaseException with the message:
An internal error has occurred. [ BLOCKING_FUNCTION_ERROR_RESPONSE:HTTP Cloud Function returned an error: {"error":{"message":"Signup with provider [google.com](http://google.com/) not allowed","status":"PERMISSION_DENIED"}} ]
This should be either a specific Exception (like FirebaseAuthBlockingFunctionErrorException) or a FirebaseAuthException with a proper code set.
Login logic shouldn't have to parse the returned exception message for magic strings or have to parse JSON to be able to react to errors.
Steps to reproduce:
- Set up Firebase Auth with a blocking cloud function
- Sign up with a data that matches the blocking criteria