Skip to content

Use a default minimum password length of 6 #7499

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

Merged
merged 3 commits into from
Jul 28, 2023

Conversation

ch5zzy
Copy link
Contributor

@ch5zzy ch5zzy commented Jul 27, 2023

The backend will enforce a minimum password length of 6 even if no minimum password length is configured. I created a backend bug for this, but we will also default to using this value in the SDK if no minimum length is set.

@changeset-bot
Copy link

changeset-bot bot commented Jul 27, 2023

⚠️ No Changeset found

Latest commit: 8c9fee1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ch5zzy ch5zzy requested a review from Xiaoshouzi-gh July 27, 2023 19:13
@ch5zzy ch5zzy marked this pull request as ready for review July 27, 2023 19:13
@ch5zzy ch5zzy requested review from lisajian, prameshj, renkelvin, sam-gc and a team as code owners July 27, 2023 19:13
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 27, 2023

Size Report 1

Affected Products

  • @firebase/auth

    TypeBase (57ed176)Merge (34b7b03)Diff
    browser176 kB176 kB+57 B (+0.0%)
    cordova205 kB205 kB+55 B (+0.0%)
    esm5230 kB230 kB+55 B (+0.0%)
    main175 kB175 kB+55 B (+0.0%)
    module176 kB176 kB+57 B (+0.0%)
    react-native190 kB190 kB+55 B (+0.0%)
  • @firebase/auth/cordova

    TypeBase (57ed176)Merge (34b7b03)Diff
    browser205 kB205 kB+55 B (+0.0%)
    module205 kB205 kB+55 B (+0.0%)
  • @firebase/auth/internal

    TypeBase (57ed176)Merge (34b7b03)Diff
    browser187 kB187 kB+57 B (+0.0%)
    esm5244 kB244 kB+55 B (+0.0%)
    main211 kB211 kB+55 B (+0.0%)
    module187 kB187 kB+57 B (+0.0%)
  • @firebase/auth/react-native

    TypeBase (57ed176)Merge (34b7b03)Diff
    browser190 kB190 kB+55 B (+0.0%)
    module190 kB190 kB+55 B (+0.0%)
  • bundle

    TypeBase (57ed176)Merge (34b7b03)Diff
    auth (Anonymous)74.9 kB74.9 kB+17 B (+0.0%)
    auth (EmailAndPassword)80.1 kB80.1 kB+17 B (+0.0%)
    auth (GoogleFBTwitterGitHubPopup)101 kB101 kB+17 B (+0.0%)
    auth (GooglePopup)98.4 kB98.4 kB+17 B (+0.0%)
    auth (GoogleRedirect)98.6 kB98.7 kB+17 B (+0.0%)
    auth (Phone)84.8 kB84.8 kB+17 B (+0.0%)
  • firebase

    TypeBase (57ed176)Merge (34b7b03)Diff
    firebase-auth-compat.js136 kB136 kB+6 B (+0.0%)
    firebase-auth-cordova.js153 kB153 kB+6 B (+0.0%)
    firebase-auth-react-native.js165 kB165 kB+6 B (+0.0%)
    firebase-auth.js131 kB131 kB+6 B (+0.0%)
    firebase-compat.js777 kB777 kB+6 B (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/Ee3y0lDcQ0.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 27, 2023

Size Analysis Report 1

This report is too large (139,506 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/ljYrCKSzIM.html

Copy link

@Xiaoshouzi-gh Xiaoshouzi-gh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall question - if backend is enforcing a min password length why do we still need to add extra logic in SDK? Would backend return 6 instead of null when using the default policy setup in the response?

@renkelvin
Copy link

Overall question - if backend is enforcing a min password length why do we still need to add extra logic in SDK? Would backend return 6 instead of null when using the default policy setup in the response?

This is a temporary solution since backend currently returns null. We can remove the extra logic once backend change is done.

@Xiaoshouzi-gh
Copy link

Overall question - if backend is enforcing a min password length why do we still need to add extra logic in SDK? Would backend return 6 instead of null when using the default policy setup in the response?

This is a temporary solution since backend currently returns null. We can remove the extra logic once backend change is done.

Thanks @renkelvin. Can we add this explanation to password_policy_impl.ts:42 @ch5zzy ?

@ch5zzy
Copy link
Contributor Author

ch5zzy commented Jul 28, 2023

Overall question - if backend is enforcing a min password length why do we still need to add extra logic in SDK? Would backend return 6 instead of null when using the default policy setup in the response?

This is a temporary solution since backend currently returns null. We can remove the extra logic once backend change is done.

Thanks @renkelvin. Can we add this explanation to password_policy_impl.ts:42 @ch5zzy ?

Done.

@ch5zzy ch5zzy merged commit 137b0b7 into password-policy Jul 28, 2023
@ch5zzy ch5zzy deleted the fix-min-password-length branch July 28, 2023 17:51
@firebase firebase locked and limited conversation to collaborators Aug 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants