firebase / firebase/firebase-unity-sdk

[Bug] Generic auth error is returned when password does not meet requirements

Open
#1,313 2 comments 0 reactions 0 assignees View on GitHub
api: auth type: bug
Dominant language
C#
Stars
320
Forks
60
Avg merge
11h 15m
Merged PRs (30d)
11

Description

### Description

With the **Enforcement Mode** set to **Require Enforcement**, passwords that don't meet the password requirements result in a generic [AuthError.Failure](https://firebase.google.com/docs/reference/unity/namespace/firebase/auth#namespace_firebase_1_1_auth_1aef1e65c370d8edb018dc417ae73ec11cae139a585510a502bbf1841cf589f5086).

Image

Ideally I'd expect this to result in an error similar to the web sdk `auth/password-does-not-meet-requirements`. However resulting in [AuthError.WeakPassword](https://firebase.google.com/docs/reference/unity/namespace/firebase/auth#namespace_firebase_1_1_auth_1aef1e65c370d8edb018dc417ae73ec11ca460899c942673a93b86a81ca6297cd36) like when **Enforcement Mode** is set to **Notify Enforcement** would also help.

Also noting here that the `auth/password-does-not-meet-requirements` error is not documented in [the web sdk docs](https://firebase.google.com/docs/reference/js/auth#autherrorcodes).

### Reproducing the issue

1. Set **Enforcement mode** to **Require Enforcement**
2. Attempt to create an account in the Unity editor, or in a mobile build.
3. --> Observe a generic Failure error is returned.

### Firebase Unity SDK Version

12.8.0

### Unity editor version

6000.0.35

### Installation Method

.unitypackage

### Problematic Firebase Component(s)

Authentication

### Other Firebase Component(s) in use

Analytics, Authentication, Firestore, Functions

### Additional SDKs you are using

_No response_

### Targeted Platform(s)

Android, Apple Platforms

### Unity editor platform

Windows

### Scripting Runtime

IL2CPP

### Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

### Relevant Log Output

```shell

```

### If using CocoaPods for Apple platforms, the project's Podfile.lock

Expand Podfile.lock snippet

```yml

👀 Replace this line with the contents of your Podfile.lock!

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.