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

refactor(vue): refactor Authenticator #4246

Merged
merged 19 commits into from
Jul 17, 2023
Merged

refactor(vue): refactor Authenticator #4246

merged 19 commits into from
Jul 17, 2023

Conversation

wlee221
Copy link
Contributor

@wlee221 wlee221 commented Jul 14, 2023

Description of changes

Refactors Vue Authenticator components, primarily to use useAuthenticator instead of internal useAuth. Also adds unit test coverage.

All commits other than temporary setups were reviewed through PRs:

Description of how you validated changes

New unit tests, existing e2e test, and smoke tests (done against the latest commit):

sign-in.mov
sign-up+confirm-sign-up.mov
setup-totp+confirm-sign-in.totp.mov
reset-password+confirm-reset-password.mov
force-new-password.mov
verify-user+confirm-verify-user.mov
federated-sign-in.mov

Checklist

  • Have read the Pull Request Guidelines
  • PR description included
  • Relevant documentation is changed or added (and PR referenced)
  • yarn test passes and tests are updated/added
  • No side effects or sideEffects field updated

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

wlee221 and others added 17 commits June 8, 2023 04:51
* Remove dependency on mock facade

* Update comment

* Remove //@ts-ignore

* useAuthenticatorValue cleanup

* Update packages/vue/src/composables/useAuth.ts

* Update packages/vue/src/composables/useAuth.ts

* Update packages/vue/src/composables/useAuth.ts

* Update tests

* fix typo

* Update packages/vue/src/composables/__tests__/useAuthenticator.spec.ts
* sign in refactor

* sign-in tests

* Federated Sign In tests

* FederatedSignInButton refactor

* Bump jest threshold

* revert unrelated change

* Remove unrelated slot change

* Add casting disclaimer

* Don't use facadeValues

* Remove dependency on mock facade

* Update comment

* Remove //@ts-ignore

* useAuthenticatorValue cleanup

* Update packages/vue/src/composables/useAuth.ts

* Update packages/vue/src/composables/useAuth.ts

* Update packages/vue/src/composables/useAuth.ts

* Update tests

* fix typo

* Share mockServiceFacade value

* Ignore __mock__ dir

* Update threshold

* Remove typo

* update mockServiceFacade usage

* Rename baseMockServiceFacade

* Update jest ignorePath

* jest cleanup

* Update packages/vue/src/components/__tests__/federated-sign-in-button.spec.ts

* Add @deprecate

* Update packages/vue/src/components/federated-sign-in-button.vue
)

* WIP

* Add qrFields to `useAuthenticator`

* SetupTOTP tests

* add confirm sign in refactor + tests

* Bump jest thresholds

* Update packages/vue/src/components/setup-totp.vue

* Update packages/vue/src/components/setup-totp.vue

* Update packages/vue/src/components/setup-totp.vue

* Use type annotation
* refactor confirm reset password

* refactor ForceNewPassword

* Bump threshold

* in progress code

* composable tests

* alias-control tests

* Use ! instead

* Turn off non-null assertion

* Clean up Authenticator

* Update packages/vue/src/components/authenticator.vue

* Authenticator cleanup

* Update packages/vue/src/components/authenticator.vue

* Update comment

* Define interface in the file

* Update packages/vue/src/components/authenticator.vue

* Update packages/vue/src/types/index.ts

* Update packages/vue/src/types/index.ts
@changeset-bot
Copy link

changeset-bot bot commented Jul 14, 2023

⚠️ No Changeset found

Latest commit: 2688996

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@wlee221 wlee221 temporarily deployed to ci July 14, 2023 02:15 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 14, 2023 02:15 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 14, 2023 02:15 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 14, 2023 02:15 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 14, 2023 02:17 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 14, 2023 02:17 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 14, 2023 02:17 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 14, 2023 02:17 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to deployment July 14, 2023 02:28 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 14, 2023 19:38 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 14, 2023 19:38 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 14, 2023 19:38 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 14, 2023 19:38 — with GitHub Actions Inactive
Comment on lines -12 to +19
branches: 22,
functions: 22,
lines: 46,
statements: 45,
branches: 89,
functions: 90,
lines: 93,
statements: 93,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

😈

Copy link
Contributor

Choose a reason for hiding this comment

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

WOW

@wlee221 wlee221 marked this pull request as ready for review July 17, 2023 17:46
@wlee221 wlee221 requested a review from a team as a code owner July 17, 2023 17:46
@wlee221 wlee221 temporarily deployed to ci July 17, 2023 18:02 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 17, 2023 18:02 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 17, 2023 18:02 — with GitHub Actions Inactive
@wlee221 wlee221 temporarily deployed to ci July 17, 2023 18:02 — with GitHub Actions Inactive
Copy link
Contributor

@zchenwei zchenwei left a comment

Choose a reason for hiding this comment

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

LGTM

@wlee221 wlee221 merged commit afbacb7 into main Jul 17, 2023
@wlee221 wlee221 deleted the vue-refactor/main branch November 6, 2023 21:40
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.

3 participants