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): TOTP #7718

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

feat(auth): TOTP #7718

wants to merge 3 commits into from

Conversation

mccjul
Copy link

@mccjul mccjul commented Mar 31, 2024

Description

This PR is to add TOTP feature to auth.

Related issues

#7483

Release Summary

Adds TOTP feature to auth.

Checklist

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

Test Plan

Currently working on the tests but would like some feedback before I write a ton of tests if the way I wrote it won't be accepted.

Whats left

  • Write e2e test
  • Validate ios implementation is valid

Copy link

vercel bot commented Mar 31, 2024

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 31, 2024 9:11pm

@CLAassistant
Copy link

CLAassistant commented Mar 31, 2024

CLA assistant check
All committers have signed the CLA.

@mccjul mccjul changed the title Feature TOTP feat(auth): TOTP Mar 31, 2024
Copy link

Hello 👋, this PR has been opened for more than 2 months with no activity on it.

If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!

You have 15 days until this gets closed automatically

@github-actions github-actions bot added the Stale label Apr 28, 2024
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.

I am sorry - I reviewed this but did not submit the review 🤦 - it looks like a good start (especially at the native level, which is usually the most difficult!) but is not consistent with firebase-js-sdk yet so needs a bit of a re-shape on the API we expose

* Enroll TOTP factor. Provide an optional display name that can be shown to the user.
* The method will ensure the user state is reloaded after successfully enrolling a factor.
*/
enrollTotp(verificationCode: string, displayName?: string): Promise<void>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting - I don't think this is strictly necessary? It is not present in the firebase-js-sdk so we need to change this to make sure we are 100% consistent with them.

What I think we need is to add FactorId.TOTP to the FactorIdMap and package the TOTP information in to the MultiFactorAssertion so we can use it in the enroll API above

Then this API is not needed

@github-actions github-actions bot removed the Stale label May 2, 2024
@mikehardy mikehardy added plugin: authentication Firebase Authentication Keep Open avoids the stale bot type: enhancement Implements a new Feature Workflow: Needs Review Pending feedback or review from a maintainer. Workflow: Waiting for User Response Blocked waiting for user response. and removed Workflow: Needs Review Pending feedback or review from a maintainer. labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: customer-response Keep Open avoids the stale bot plugin: authentication Firebase Authentication type: enhancement Implements a new Feature Workflow: Waiting for User Response Blocked waiting for user response.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants