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

Add Firebase Auth MFA info to user record #745

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edwardmp
Copy link

@edwardmp edwardmp commented Dec 5, 2022

Hi,

I noticed this SDK doesn't yet expose MFA info supported by Identity platform.
The issue ##645 also mentions this.

So I implemented it :) Let me know what you think

@google-cla
Copy link

google-cla bot commented Dec 5, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@lahirumaramba
Copy link
Member

Thank you @edwardmp for your contribution! Changes to the public API interface requires an internal API review. Please stay tuned.

@prameshj @pragatimodi tagging as FYI. I think we will need an API review for this. Thanks!

@edwardmp
Copy link
Author

edwardmp commented Jan 2, 2023

Hi @prameshj & @pragatimodi, do you have any time to take a look? 🙏

@prameshj
Copy link

prameshj commented Jan 3, 2023

@pragatimodi Would you be able to review this? Thanks!

Also FYI @renkelvin

@pragatimodi
Copy link

Thanks for making the change and contributing to this repository!
Had a few notes here -

  1. Looks like the MFA config has only been added as field with it's own get() function and not create/update/get functions that make calls to the backend. I don't think we can merge the PR without implementations for these.
  2. Please add request and response validators for MFA data.
  3. Please add test cases for data validation.

@edwardmp
Copy link
Author

edwardmp commented Jan 3, 2023

@pragatimodi thanks for the review!

  1. You mean add API to get/create/update/delete MFA info by itself? Makes sense, my own use case only covered get but I'll see if I can address that too.
  2. Can you clarify what you mean here? Validating the Firebase server response and validating any get request? Perhaps you can point me to an example of what you mean elsewhere in the codebase?
  3. You mean test cases for the validation as mentioned by point 2?

By the way, happy to help, just wondering why Google/Firebase itself hasn't target parity with the Identity platform API yet as to MFA?

@pragatimodi
Copy link

pragatimodi commented Jan 26, 2023

@edwardmp Apologies for the delay, please find my responses below -

  1. Yes that's right. We want to be able to cater to all kinds of use cases and get() alone isn't enough for the master branch.
  2. I meant validating the request sent to the backend where the MFA config being sent for create/update is valid. For example, you can find examples here for NodeJS Admin SDK and for Go Admin SDK
  3. Yes and making sure that the flows work and JSON parsing is done correctly.

Hope this helps.

Thanks for contributing to the Firebase Identity platform API. We're actively working on adding MFA support to our SDKs. NodeJS and Golang SDKs already have this feature, and the rest of the SDKs are in progress. We anticipate it will be available sometime in the near future. Thanks for your interest!

@edwardmp
Copy link
Author

@pragatimodi

Thanks for the response. Would be happy to expand my PR to include this, just confused by your final remark

We anticipate it will be available sometime in the near future

So is Google already working on this, i.e. is there no point for me to work on this right now or..?

@pragatimodi
Copy link

I was clarifying a point on adding feature parity there. We welcome any contributions you may be able to make to the repository to help us accelerate the development process and glad to review any PRs!
Please note that changes to the public API must go through an internal review process, which sometimes can take a while to complete.

@edwardmp
Copy link
Author

@pragatimodi hey, I finally have some time to improve this PR, but beforeI dive in, to avoid duplicate work, wanted to make sure Firebase/Google doesn't already have something in the works for this?

Thanks in advance

@pragatimodi
Copy link

Hi @edwardmp
Thanks for your message. We're always eager to enhance our Firebase repository. Feel free to take the lead, and if you have any questions or need assistance along the way, don't hesitate to reach out. Our team hasn't had the opportunity to dive into this yet, so your contribution is much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants