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

DEV-574 DEV-635 small bug fixes #73

Merged
merged 5 commits into from
Sep 6, 2023
Merged

DEV-574 DEV-635 small bug fixes #73

merged 5 commits into from
Sep 6, 2023

Conversation

RJFelix
Copy link
Contributor

@RJFelix RJFelix commented Aug 31, 2023

Glance
Closes DEV-574
Closes DEV-635

  • Manually redirect after TOTP setup as appropriate, since we prevent CoreJS from auto-redirecting so we can show backup codes
  • Match showPasswordSet step name between model and form, so an "oops" unhandled error view doesn't show
  • After an async Userfront call resolves, introduce a slight delay to allow a CoreJS auto-redirect to actually happen, to reduce the chance for the "success" view to flicker before redirect
    • Added a Linear issue + TODO to do this properly in the future (sequence the async tasks such that we're guaranteed to redirect before the Userfront call resolves, not just likely to do so)

1. Match the step name between the model and form so we don't get an "oops" view flicker
2. Slightly delay resolution of async CoreJS calls to give the redirect an opportunity to happen before showing the success view, so the success view doesn't flicker
@linear
Copy link

linear bot commented Aug 31, 2023

DEV-574 New Toolkit: should redirect after completing second factor setup

To reproduce:

  1. Go to userfront.com/signup, or userfront.com/login with an existing non-MFA account
  2. Sign up or log in

Expected: redirect to /setup after signup and /dashboard after login

Actual: not redirected

DEV-635 Flash of "Oops something went wrong" in toolkit login

Currently when going through the SSO flow, the toolkit flashes "Oops something went wrong" for a short (sometimes longer) duration.

https://www.loom.com/share/25ab3f5018c54b628716c6d6d1f65261

@vercel
Copy link

vercel bot commented Aug 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vercel-toolkit-react-dev-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 6:47pm
vercel-toolkit-react-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 6:47pm

@github-actions
Copy link
Contributor

github-actions bot commented Aug 31, 2023

Coverage Summary for `package`

Status Category Percentage Covered / Total
🔵 Lines 68.81% 3169 / 4605
🔵 Statements 68.81% 3169 / 4605
🔵 Functions 49.71% 88 / 177
🔵 Branches 62.38% 131 / 210
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
package/src/components/AlternativeButton.jsx 69.23% 100% 0% 69.23% 8-11
package/src/components/BackButton.jsx 39.47% 100% 0% 39.47% 14-36
package/src/components/ContinueButton.jsx 47.36% 100% 0% 47.36% 8-17
package/src/components/Divider.jsx 54.16% 100% 0% 54.16% 12-22
package/src/components/ErrorMessage.jsx 92.59% 33.33% 100% 92.59% 16-17
package/src/components/IconButton.jsx 28.57% 100% 0% 28.57% 15-16, 19-28, 47-136, 147-159
package/src/components/InfoMessage.jsx 45.83% 100% 0% 45.83% 10-22
package/src/components/PhoneNumberInput.jsx 69.44% 0% 0% 69.44% 24-34
package/src/components/RetryButton.jsx 61.11% 100% 0% 61.11% 10-16
package/src/components/SecuredByUserfront.jsx 100% 100% 100% 100%
package/src/components/SubmitButton.jsx 100% 100% 100% 100%
package/src/components/TestModeNotice.jsx 66.66% 50% 50% 66.66% 16-18, 20-21, 28-34
package/src/components/Input/BackupCodeInput.jsx 100% 100% 100% 100%
package/src/components/Input/BaseInput.jsx 93.54% 33.33% 100% 93.54% 27-28
package/src/components/Input/EmailInput.jsx 100% 100% 100% 100%
package/src/components/Input/EmailOrUsernameInput.jsx 100% 100% 100% 100%
package/src/components/Input/PasswordInput.jsx 90.9% 0% 0% 90.9% 20-23
package/src/components/Input/TotpCodeInput.jsx 100% 100% 100% 100%
package/src/components/Input/VerificationCodeInput.jsx 100% 100% 100% 100%
package/src/components/Input/index.jsx 88% 100% 50% 88% 23-25
package/src/forms/UniversalForm.jsx 52.83% 7.4% 100% 52.83% 172-174, 190-208, 211-221, 223-235, 241-251, 253-265, 269-276, 288-294, 296-302, 304-310, 314-318, 320-326, 328-332, 334-340, 342-346, 350-354, 356-362, 364-368, 370-376, 378-382, 386-390, 392-398, 400-403, 407-420, 422-435, 437-441, 445-451, 453-459, 461-467, 469-475, 477-481, 484-488, 495-499, 503-507, 520-527, 530-533, 537-540, 544-548
package/src/models/config/actions.ts 67% 97.82% 89.74% 67% 63-77, 79-92, 96-101, 130-131, 159-169, 174-180, 196-201, 207-213, 218-222, 229-235, 243-248, 265-266, 283-285, 313-326, 338-339, 351-355, 375-376, 379-394
package/src/models/config/guards.ts 80.15% 100% 55.88% 80.15% 44, 48, 55-60, 68, 73, 78, 85-91, 96, 101, 106-107, 117, 121, 125
package/src/models/config/utils.ts 91.71% 100% 78.57% 91.71% 108-118, 123-124, 134
package/src/models/forms/universal.ts 91.59% 100% 5% 91.59% 95-96, 121-126, 131-132, 162-167, 171-172, 174-175, 177-178, 180-181, 183-184, 186-187, 238, 324-330, 614-622, 636-646, 752-759
package/src/models/views/emailCode.ts 96.8% 50% 100% 96.8% 37-38, 40-41
package/src/models/views/emailLink.ts 88.23% 28.57% 100% 88.23% 37-42, 49-50, 52-53, 94-95, 97-98
package/src/models/views/password.ts 75.26% 100% 0% 75.26% 42-64
package/src/models/views/selectFactor.ts 100% 100% 100% 100%
package/src/models/views/setNewPassword.ts 78.94% 100% 0% 78.94% 35-50
package/src/models/views/setUpTotp.ts 89.91% 100% 0% 89.91% 55-66
package/src/models/views/smsCode.ts 96.87% 50% 100% 96.87% 40-41, 43-44
package/src/models/views/totpCode.ts 66.66% 100% 0% 66.66% 37-61, 89-109
package/src/services/logging.js 38.46% 100% 0% 38.46% 5-6, 9-10, 13-15, 18-26
package/src/services/userfront.ts 65.88% 53.33% 60% 65.88% 49-62, 74-78, 83-85, 101-102, 104-108, 111-113, 128-129, 147-170
package/src/utils/hooks.js 80% 77.77% 100% 80% 12, 19-20, 22-23
package/src/views/AlreadyLoggedIn.jsx 77.77% 100% 0% 77.77% 6-7
package/src/views/EmailLinkSent.jsx 50% 100% 0% 50% 15-30
package/src/views/EnterEmail.jsx 71.42% 50% 50% 71.42% 20-33
package/src/views/EnterPhone.jsx 42.1% 100% 0% 42.1% 15-36
package/src/views/EnterTotpCode.jsx 18.11% 100% 0% 18.11% 22-125
package/src/views/EnterVerificationCode.jsx 34.78% 100% 0% 34.78% 15-44
package/src/views/GeneralErrorMessage.jsx 65% 100% 0% 65% 12-18
package/src/views/LogInWithPassword.jsx 28.33% 100% 0% 28.33% 16-58
package/src/views/Message.jsx 81.81% 100% 0% 81.81% 8-9
package/src/views/Placeholder.jsx 75% 100% 0% 75% 5-6
package/src/views/SelectFactor.jsx 26.8% 100% 0% 26.8% 25-95
package/src/views/SetNewPassword.jsx 62.36% 100% 50% 62.36% 19-53
package/src/views/SetNewPasswordSuccess.jsx 75% 100% 0% 75% 5-6
package/src/views/SetUpTotp.jsx 34.61% 100% 0% 34.61% 17-50
package/src/views/SetUpTotpSuccess.jsx 36.11% 100% 0% 36.11% 12-34
package/src/views/SignUpWithPassword.jsx 20.4% 100% 0% 20.4% 19-96
package/src/views/Success.jsx 50% 100% 0% 50% 10-20
package/src/views/TotpErrorMessage.jsx 48.48% 100% 0% 48.48% 15-31

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

Published version 1.0.1-alpha.1 to npm.

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