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: update passwordless to support OTP based MFA #759

Merged
merged 47 commits into from
Dec 10, 2023

Conversation

porcellus
Copy link
Collaborator

Summary of change

(A few sentences about this PR)

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 10, 2023

size-limit report 📦

Path Size
lib/build/index.js 16.18 KB (+0.58% 🔺)
recipe/session/index.js 17.28 KB (+0.81% 🔺)
recipe/session/prebuiltui.js 19.98 KB (+0.64% 🔺)
recipe/thirdpartyemailpassword/index.js 30.13 KB (0%)
recipe/thirdparty/index.js 26.76 KB (0%)
recipe/emailpassword/index.js 10.2 KB (0%)
recipe/emailverification/index.js 7.45 KB (0%)
recipe/passwordless/index.js 67.5 KB (+5.58% 🔺)
recipe/thirdpartypasswordless/index.js 87.82 KB (+4.63% 🔺)
recipe/emailverification/prebuiltui.js 26.07 KB (+1.77% 🔺)
recipe/thirdpartyemailpassword/prebuiltui.js 56.75 KB (+0.8% 🔺)
recipe/thirdparty/prebuiltui.js 40.86 KB (+0.97% 🔺)
recipe/emailpassword/prebuiltui.js 30 KB (+0.5% 🔺)
recipe/passwordless/prebuiltui.js 113.32 KB (+7.79% 🔺)
recipe/thirdpartypasswordless/prebuiltui.js 141.78 KB (+6.81% 🔺)
recipe/multitenancy/index.js 6.31 KB (0%)
recipe/multifactorauth/index.js 7.87 KB (0%)
recipe/multifactorauth/prebuiltui.js 25.56 KB (+1.77% 🔺)

@porcellus porcellus changed the title Feat/mfa/otp feat: updated passwordless to support OTP based MFA Nov 17, 2023
@porcellus porcellus changed the title feat: updated passwordless to support OTP based MFA feat: update passwordless to support OTP based MFA Nov 17, 2023
@porcellus porcellus marked this pull request as ready for review November 17, 2023 00:50
Base automatically changed from feat/mfa/recipe-setup to feat/mfa/base December 10, 2023 15:42
@porcellus porcellus merged commit 153da40 into feat/mfa/base Dec 10, 2023
20 of 23 checks passed
@porcellus porcellus deleted the feat/mfa/otp branch December 10, 2023 22:40
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