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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**/*.ts
**/*.css
**/*.tsx
!**/*.d.ts
.git/
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.40.0] - 2024-04-15

### Breaking Changes

- `onFailureRedirection` is no longer allowed to return relative paths.
- We now throw an error if `onFailureRedirection` returns the current URL or path when:
- redirecting away from the auth page (`websiteBasePath`, usually `/auth`) when a session already exists
- redirecting after sign in/up
- redirecting after successful email verification
- redirecting after a successful MFA factor completion

### Changes

- 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 we ony set the context if `onFailureRedirection` returned the current URL.
- Now we ony call the navigation function if `onFailureRedirection` returned something different than the current URL.
- Made the `name` property optional in custom provider configs for usage with `usesDynamicLoginMethods`, where the tenant configuration is expected to set the name dynamically.
- Note, that not setting the name will make the UI crash if the `usesDynamicLoginMethods` is set to `false` or if the tenant configuration doesn't include a provider list.

## [0.39.1] - 2024-03-27

- Fixes how we fetch the component to render based on the current path to take into account non auth recipes correctly.
Expand Down
3 changes: 2 additions & 1 deletion examples/for-tests-react-16/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ export function getApiDomain() {
export function getWebsiteDomain() {
const websitePort = process.env.REACT_APP_WEBSITE_PORT || 3031;
const websiteUrl = process.env.REACT_APP_WEBSITE_URL || `http://localhost:${websitePort}`;
return websiteUrl;

return getQueryParams("websiteDomain") ?? websiteUrl;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion examples/for-tests/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function getApiDomain() {
export function getWebsiteDomain() {
const websitePort = process.env.REACT_APP_WEBSITE_PORT || 3031;
const websiteUrl = process.env.REACT_APP_WEBSITE_URL || `http://localhost:${websitePort}`;
return websiteUrl;
return getQueryParams("websiteDomain") ?? websiteUrl;
}

/*
Expand Down
3 changes: 2 additions & 1 deletion lib/build/components/assets/blockedIcon.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/build/components/assets/otpEmailIcon.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/build/components/assets/otpSMSIcon.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/build/components/assets/totpIcon.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 17 additions & 15 deletions lib/build/emailpassword-shared9.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/build/emailverification-shared2.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/genericComponentOverrideContext.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

85 changes: 61 additions & 24 deletions lib/build/index2.js

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions lib/build/multifactorauth-shared.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 13 additions & 16 deletions lib/build/multifactorauth-shared2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading