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: add the mfa recipe and basic support #758

Merged
merged 24 commits into from
Dec 10, 2023

Conversation

porcellus
Copy link
Collaborator

Summary of change

feat: add the mfa recipe and basic support

Related issues

  • Link to issue1 here
  • Link to issue1 here

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

Documentation changes

(If relevant, please create a PR in our docs repo, or create a checklist here highlighting the necessary changes)

Checklist for important updates

  • Changelog has been updated
  • frontendDriverInterfaceSupported.json file has been updated (if needed)
  • Changes to the version if needed
    • In package.json
    • In package-lock.json
    • In lib/ts/version.ts
  • Had run npm run build-pretty
  • Had installed and ran the pre-commit hook
  • Issue this PR against the latest non released version branch.
    • To know which one it is, run find the latest released tag (git tag) in the format vX.Y.Z, and then find the latest branch (git branch --all) whose X.Y is greater than the latest released tag.
    • If no such branch exists, then create one from the latest released branch.
  • If added a new recipe interface, then make sure that the implementation of it uses NON arrow functions only (like someFunc: function () {..}).
  • If I added a new recipe, I also added the recipe entry point into the size-limit section of package.json with the size limit set to the current size rounded up.
  • If I added a new recipe, I also added the recipe entry point into the rollup.config.mjs

Remaining TODOs for this PR

  • Item1
  • Item2

Copy link

github-actions bot commented Nov 9, 2023

size-limit report 📦

Path Size
lib/build/index.js 16.09 KB (+13.05% 🔺)
recipe/session/index.js 17.14 KB (+12.92% 🔺)
recipe/session/prebuiltui.js 19.86 KB (+11.02% 🔺)
recipe/thirdpartyemailpassword/index.js 30.13 KB (+0.7% 🔺)
recipe/thirdparty/index.js 26.76 KB (+0.73% 🔺)
recipe/emailpassword/index.js 10.2 KB (+1.85% 🔺)
recipe/emailverification/index.js 7.45 KB (+2.64% 🔺)
recipe/passwordless/index.js 63.93 KB (+0.38% 🔺)
recipe/thirdpartypasswordless/index.js 83.94 KB (+0.33% 🔺)
recipe/emailverification/prebuiltui.js 25.62 KB (+13.38% 🔺)
recipe/thirdpartyemailpassword/prebuiltui.js 56.3 KB (+4.13% 🔺)
recipe/thirdparty/prebuiltui.js 40.47 KB (+4.78% 🔺)
recipe/emailpassword/prebuiltui.js 29.85 KB (+6.94% 🔺)
recipe/passwordless/prebuiltui.js 105.14 KB (+1.85% 🔺)
recipe/thirdpartypasswordless/prebuiltui.js 132.75 KB (+1.81% 🔺)
recipe/multitenancy/index.js 6.31 KB (+3.09% 🔺)
recipe/multifactorauth/index.js 7.87 KB (+100% 🔺)
recipe/multifactorauth/prebuiltui.js 25.11 KB (+100% 🔺)

@porcellus porcellus merged commit c42c397 into feat/mfa/base Dec 10, 2023
21 of 23 checks passed
@porcellus porcellus deleted the feat/mfa/recipe-setup branch December 10, 2023 15:42
rishabhpoddar pushed a commit that referenced this pull request Mar 12, 2024
* chore: update to mfa branch of web-js

* feat: mfa recipe setup

* feat: add support for firstFactor

* fix: fix chooseComponentBasedOnFirstFactors to properly get the max count

* feat: navigation based on claim validation failures

* feat: implement factor chooser screen

* feat: factor chooser fixes and updates

* feat: update pwless to support otp based mfa

* feat: initial impl of totp mfa

* feat: export totp bundle

* feat: finish TOTP + test setup WIP

* feat: finish TOTP + test setup WIP

* feat: add back button to factor chooser and filter the options

* feat: update how back buttons are styled

* test: update how back button is selected in tests

* feat: finishing totp initial impl

* test: initial test for MFA

* feat: self-review fixes & updates

* feat: self-review fixes&cleanup

* feat: self-review fixes&cleanup

* test: add firstFactors tests

* tests: complete initial test-set of MFA

* fix: firstFactors + test helpers

* fix: small test based fixes

* feat: finishing touches

* test: update first factor tests to match new behaviour w/ extra checks

* feat: clean up first factor handling

* feat: add retry info to verifyCode/Device

* refactor: rename passwordlessFirstFactors since it's not only first factors

* feat: self-review fixes

* chore: add mfa ui to size limits

* refactor: remove updates that will be added in other PRs + simplifications

* test: clean up

* chore: increase size limits

* test: add reset method to mfa recipe

* feat: make sure firstFactor conflicts hit user error boundaries

* feat: update design and fix font-weight issues

* chore: update web-js dep

* feat: update design

* feat: update design

* refactor: self-review fixes

* refactor: self-review fixes

* chore: update changelog

* fix: revert unnecessary changes

* feat: use redirect info if available on mfa success

* refactor: use redirectToFactor instead of re-implementing

* fix: add missing param into redirectToFactorChooser call

* chore: update changelog

* test: update tests for MFA

* test: skip mock mfa tests until removal

* fix: override and routing fixes

* test: update e2e test to work with an actual BE

* fix: making sure async errors hit error boundaries + smaller test fixes

* feat: allow showing matching sub-recipe components if not on websitebasepath

* fix: auth server test

* feat: add the mfa recipe and basic support (#758)

* chore: update to mfa branch of web-js

* feat: mfa recipe setup

* feat: add support for firstFactor

* fix: fix chooseComponentBasedOnFirstFactors to properly get the max count

* feat: navigation based on claim validation failures

* feat: implement factor chooser screen

* feat: factor chooser fixes and updates

* feat: add back button to factor chooser and filter the options

* test: update how back button is selected in tests

* feat: self-review fixes & updates

* fix: firstFactors + test helpers

* feat: clean up first factor handling

* feat: self-review fixes

* chore: add mfa ui to size limits

* refactor: remove updates that will be added in other PRs + simplifications

* chore: increase size limits

* test: add reset method to mfa recipe

* feat: update design and fix font-weight issues

* chore: update web-js dep

* refactor: use redirectToFactor instead of re-implementing

* fix: override and routing fixes

* feat: allow showing matching sub-recipe components if not on websitebasepath

* chore: add missing notes to changelog

* test: ensure tests pass on older versions

* test: add missing case

* fix: exposing mfa in tppwless + cleanup/refactor

* test: split up mfa tests into multiple files

* feat: update passwordless to support OTP based MFA (#759)

* chore: update to mfa branch of web-js

* feat: mfa recipe setup

* feat: add support for firstFactor

* fix: fix chooseComponentBasedOnFirstFactors to properly get the max count

* feat: navigation based on claim validation failures

* feat: implement factor chooser screen

* feat: factor chooser fixes and updates

* feat: update pwless to support otp based mfa

* feat: add back button to factor chooser and filter the options

* feat: update how back buttons are styled

* test: update how back button is selected in tests

* feat: self-review fixes & updates

* feat: self-review fixes&cleanup

* fix: firstFactors + test helpers

* fix: small test based fixes

* feat: clean up first factor handling

* refactor: rename passwordlessFirstFactors since it's not only first factors

* feat: self-review fixes

* chore: add mfa ui to size limits

* refactor: remove updates that will be added in other PRs + simplifications

* chore: increase size limits

* test: add reset method to mfa recipe

* feat: make sure firstFactor conflicts hit user error boundaries

* feat: update design and fix font-weight issues

* chore: update web-js dep

* feat: update design

* refactor: self-review fixes

* refactor: self-review fixes

* chore: update changelog

* feat: use redirect info if available on mfa success

* refactor: use redirectToFactor instead of re-implementing

* fix: add missing param into redirectToFactorChooser call

* fix: override and routing fixes

* feat: allow showing matching sub-recipe components if not on websitebasepath

* fix: exposing mfa in tppwless + cleanup/refactor

* feat: totp recipe for MFA (#763)

* chore: update to mfa branch of web-js

* feat: mfa recipe setup

* feat: add support for firstFactor

* fix: fix chooseComponentBasedOnFirstFactors to properly get the max count

* feat: navigation based on claim validation failures

* feat: implement factor chooser screen

* feat: factor chooser fixes and updates

* feat: update pwless to support otp based mfa

* feat: initial impl of totp mfa

* feat: export totp bundle

* feat: finish TOTP + test setup WIP

* feat: finish TOTP + test setup WIP

* feat: add back button to factor chooser and filter the options

* feat: update how back buttons are styled

* test: update how back button is selected in tests

* feat: finishing totp initial impl

* test: initial test for MFA

* feat: self-review fixes & updates

* feat: self-review fixes&cleanup

* feat: self-review fixes&cleanup

* test: add firstFactors tests

* tests: complete initial test-set of MFA

* fix: firstFactors + test helpers

* fix: small test based fixes

* feat: finishing touches

* test: update first factor tests to match new behaviour w/ extra checks

* feat: clean up first factor handling

* feat: add retry info to verifyCode/Device

* refactor: rename passwordlessFirstFactors since it's not only first factors

* feat: self-review fixes

* chore: add mfa ui to size limits

* refactor: remove updates that will be added in other PRs + simplifications

* test: clean up

* chore: increase size limits

* test: add reset method to mfa recipe

* feat: make sure firstFactor conflicts hit user error boundaries

* feat: update design and fix font-weight issues

* chore: update web-js dep

* feat: update design

* feat: update design

* refactor: self-review fixes

* refactor: self-review fixes

* chore: update changelog

* fix: revert unnecessary changes

* feat: use redirect info if available on mfa success

* refactor: use redirectToFactor instead of re-implementing

* fix: add missing param into redirectToFactorChooser call

* chore: update changelog

* test: update tests for MFA

* test: skip mock mfa tests until removal

* fix: override and routing fixes

* feat: allow showing matching sub-recipe components if not on websitebasepath

* fix: exposing mfa in tppwless + cleanup/refactor

* refactor: cleanup&renames

* refactor: consistency fixes

* docs: add storybook (#774)

* ci: add storybook

* ci: update stories after merge

* ci: update&add stories

* refactor: small code-changes to help storybooks build/work right

* docs: fix usesDynamicLoginMethods control in storybooks

* docs: reset uis properly when re-rendering auth page stories

* docs: provide better error reporting in auth page stories

* docs: add separate stories for different button configs in totp

* test: add stories for auth recipe screens

* fix: type fixes and design updates + extended storybook

* test: make tests backward compatible

* fix: fix recipe name in error message

* test: fix enableMFA

* test: update tests to work w/ new BE behaviour

* fix: small self-review fixes

* fix: self-review fixes

* fix: add missing type to prebuiltuis

* fix: fix console errors

* fix: small design and usability upgrades

* docs: update with-phone-password to use MFA

* docs: remove 2fa examples and update the README to point to new mfa examples

* fix: add missing arg to redirectToFactorChooser

* fix: add missing param

* fix: add missing param

* docs: add mfa example with recovery codes

* docs: save netlify-cli version in netlify example

* fix: mfa otp loading screen override

* docs: add mfa-with-phone-chooser example

* fix: remove duplicate type + rebuild

* refactor: removed unused state and related action/types

* refactor: simplify impl

* refactor: make usage of FeatureBaseProps consistent

* refactor: consistency updates

* chore: remove unused test code

* feat(mfa): finish todo list (#782)

* feat: updated when we ask for contact info based slack discussion

* fix: make sure change email address shows up at the right time

* docs: update emailverification-with-otp example to use MFA

* test: add test cases that check if redirectToPath is respected in mfa

* fix: small fixes and updates for the updated node impl

* test: update tests to match new behaviour/utils

* docs: reset dependencies to latest

* feat(mfa!): w1 discussions (#787)

* feat: update to match new BE interface

* feat: simplifications and consistency fixes

* test: remove test changes & rebuild

* fix: manual-test fixes

* chore: update to match new st-web types

* feat: add totp events + update types

* chore: add clarification comment

* refactor: clean up todos

* feat(mfa): implement w2 discussion (#788)

* feat: updates based on w2 discussions

* chore: update changelog

* test: test app consistency fixes

* chore: remove duplicate deps

* chore: add storybook to npmignore

* feat: implementing review comments

* fix: update how we decide when to show the back button

* fix: remove !important from css styles (#791)

* feat: fix types and add newSessionCreated to redirect context

* feat: implementing review feedback + discussion

* feat: update getLoginMethod types and related logic

* fix: test fixes

* feat: expose FactorIds through the mfa recipe

* feat: add rid to success events

* docs: update examples to newest API

* feat: redirect to the email verification page in case MFA requires it

* docs: update account-linking example

* docs: update recovery code example to separate the create recovery code page

* docs: update example readmes and minor cleanup

* feat\!: rename isNewPrimaryUser to createdNewUser

* chore: update changelog and PR template checklist with review comments

* docs: add error codes to translation files

* chore: move and update version requirements in changelog

* chore: add factor id list update to pr checklist

* docs: complete error code list in translation files

* feat: add consistent fallbacks to every onFetchError

* docs: removed example we will be splitting up

* docs: implement review comments in examples and extend the changelog

* docs: replace custom API with session based linking

* docs: update examples to new interface

* feat: update totp logo

* feat: update after web-js types changed

* fix: minor test fixes and updates

* chore: update size limits

* docs: update examples

* docs: rename updated phone-pw example to phone-pw-mfa and reset the phone-pw to master

---------

Co-authored-by: Sattvik Chakravarthy <[email protected]>
Co-authored-by: Ankit Tiwari <[email protected]>
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.

1 participant