Skip to content
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

feat(auth): validatePassword method implementation #8400

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

MichaelVerdon
Copy link
Collaborator

@MichaelVerdon MichaelVerdon commented Mar 11, 2025

Description

Implement validatePassword() method and match implementation to JS-SDK: https://github.com/firebase/firebase-js-sdk/blob/main/packages/auth/src/core/index.ts#L116

Draft: still needs implementation and e2e tests properly functioning.
closes #8359

Related issues

Fixes #8359

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
    • Other (macOS, web)
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Copy link

vercel bot commented Mar 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2025 4:32pm

Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

most important thoughts are around:

  • the auth unit test structure (proposed a solution there, non-functional though)
  • attribution if there was google code used

rest are trivialities

let schemaVersion = 1;

try {
// Identity toolkit API endpoint for password policy. Ensure this is enabled on Google cloud.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I seem to recall you suffered this error didn't you? Do you remember anything characteristic about the error that could be used to identify it for developers. Then we could document it perhaps. Might make sense to mention it specifically in the API doc either way ("Verify in Google Cloud Project that your API key has access too XYZ") whatever XYZ is

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If you ensure the identity toolkit api is enabled on google cloud console and that your firebase console api key has access to it, it should be fine. Should I append this to documentation or here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should I append this to documentation

The goal is to make it discoverable for developers. I think the quickest way to do that for something API specific like this, is in the API doc that will be rendered into the reference website for APIs

Copy link
Collaborator

Choose a reason for hiding this comment

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

Still needs this resolved - just to add a quick note in the comment section of the API for this ?

@@ -0,0 +1,132 @@
/*
* Copyright (c) 2016-present Invertase Limited & Contributors
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you use any Google firebase-js-sdk code for this? If so I think we need to do the Co-Authored-By: <foo@google.com> for all authors trick that was used for vertexai, based on the committers for the file(s) you used

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In here, it has been brought over from the JS-SDK so I can put the co-authored part in.

- cleanly split between namespace / modular - some sections were mixed
- remove empty block avoiding test
- fix double-nesting on ActionCodeSettings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛] 🔥 createUserWithEmailAndPassword returns wrong error code
3 participants