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

fix: minor UX improvements #811

Merged
merged 15 commits into from
Apr 15, 2024

Conversation

porcellus
Copy link
Collaborator

Summary of change

  • We now redirect to the factor chooser screen if the MFA claim validator fails even if there is no available next factor. This will always show an access denied screen, which should help debugging.
  • clearOnSubmit now only clears the field value if the request returned an error. This is because the form navigates on success, making clearing the field unnecessary (which can lead to confusing UX if the navigation takes too long).
  • Fixed an issue where SessionAuth contents popped in before navigating away if a claim validator failed. Now SessionAuth does not set the context before navigation.
  • Made the name property optional in custom provider configs
  • Added css files to npmignore

Related issues

Test Plan

Updated tests cases should cover this.

Manually tested:

  • Claim validator navigation
  • Custom provider config crashing/working well with names set in tenant config
  • OTP clearing upon error

Documentation changes

N/A

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
  • If I added a new login method, I modified the list in lib/ts/types.ts
  • If I added a factor id, I modified the list in lib/ts/recipe/multifactorauth/types.ts

Copy link

github-actions bot commented Apr 11, 2024

size-limit report 📦

Path Size
lib/build/index.js 17.67 KB (+1.61% 🔺)
recipe/session/index.js 18.69 KB (+1.66% 🔺)
recipe/session/prebuiltui.js 21.5 KB (+1.5% 🔺)
recipe/thirdpartyemailpassword/index.js 31.11 KB (+0.68% 🔺)
recipe/thirdparty/index.js 27.5 KB (+0.75% 🔺)
recipe/emailpassword/index.js 10.89 KB (+1.61% 🔺)
recipe/emailverification/index.js 7.71 KB (+0.02% 🔺)
recipe/passwordless/index.js 69.08 KB (+0.24% 🔺)
recipe/thirdpartypasswordless/index.js 89.99 KB (+0.22% 🔺)
recipe/emailverification/prebuiltui.js 27.43 KB (+1.31% 🔺)
recipe/thirdpartyemailpassword/prebuiltui.js 62.56 KB (+0.54% 🔺)
recipe/thirdparty/prebuiltui.js 44.02 KB (+0.72% 🔺)
recipe/emailpassword/prebuiltui.js 33.32 KB (+0.96% 🔺)
recipe/passwordless/prebuiltui.js 116.74 KB (+0.33% 🔺)
recipe/thirdpartypasswordless/prebuiltui.js 146.95 KB (+0.24% 🔺)
recipe/multitenancy/index.js 6.54 KB (0%)
recipe/multifactorauth/index.js 10.63 KB (+1.58% 🔺)
recipe/multifactorauth/prebuiltui.js 26.84 KB (+1.2% 🔺)

@porcellus porcellus changed the title fix: debugging/DX improvements fix: debugging/DX/(minor)UX improvements Apr 11, 2024
@porcellus porcellus changed the title fix: debugging/DX/(minor)UX improvements fix: minor UX improvements Apr 11, 2024
lib/ts/recipe/session/utils.ts Show resolved Hide resolved
package.json Outdated
@@ -1,6 +1,6 @@
{
"name": "supertokens-auth-react",
"version": "0.39.1",
"version": "0.39.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

consider making this a breaking change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm fine with making this a breaking change.

@rishabhpoddar rishabhpoddar changed the base branch from 0.39 to 0.40 April 15, 2024 13:52
@rishabhpoddar rishabhpoddar merged commit ce62381 into 0.40 Apr 15, 2024
25 of 29 checks passed
@rishabhpoddar rishabhpoddar deleted the fix/show_access_denied_on_no_next_factor branch April 15, 2024 13:52
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.

2 participants