logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
8.31k stars 406 forks source link

refactor(console): keep button loading before redirecting to sign-in success page #6305

Closed xiaoyijun closed 1 month ago

xiaoyijun commented 1 month ago

Summary

This PR refactors the global redirect functionality to maintain the loading state of interaction elements (e.g., buttons) until the page is fully redirected after a successful sign-in.

Key changes include:

Testing

Test locally and everything works well.

Checklist

github-actions[bot] commented 1 month ago

COMPARE TO master

Total Size Diff :chart_with_upwards_trend: +943 Bytes

Diff by File |Name|Diff| |---|---| |packages/experience/src/containers/SocialLinkAccount/use-social-link-related-user.ts|:chart_with_upwards_trend: +6 Bytes| |packages/experience/src/containers/VerificationCode/use-continue-flow-code-verification.ts|:chart_with_upwards_trend: +6 Bytes| |packages/experience/src/containers/VerificationCode/use-register-flow-code-verification.ts|:chart_with_upwards_trend: +12 Bytes| |packages/experience/src/containers/VerificationCode/use-sign-in-flow-code-verification.ts|:chart_with_upwards_trend: +12 Bytes| |packages/experience/src/hooks/use-global-redirect-to.ts|:chart_with_upwards_trend: +829 Bytes| |packages/experience/src/hooks/use-password-sign-in.ts|:chart_with_upwards_trend: +6 Bytes| |packages/experience/src/hooks/use-send-mfa-payload.ts|:chart_with_upwards_trend: +6 Bytes| |packages/experience/src/hooks/use-skip-mfa.ts|:chart_with_upwards_trend: +6 Bytes| |packages/experience/src/hooks/use-social-link-account.ts|:chart_with_upwards_trend: +6 Bytes| |packages/experience/src/hooks/use-social-register.ts|:chart_with_upwards_trend: +6 Bytes| |packages/experience/src/pages/Consent/index.tsx|:chart_with_upwards_trend: +6 Bytes| |packages/experience/src/pages/Continue/SetPassword/index.tsx|:chart_with_upwards_trend: +12 Bytes| |packages/experience/src/pages/Continue/SetUsername/use-set-username.ts|:chart_with_upwards_trend: +6 Bytes| |packages/experience/src/pages/RegisterPassword/index.tsx|:chart_with_upwards_trend: +12 Bytes| |packages/experience/src/pages/SocialSignInWebCallback/use-single-sign-on-listener.ts|:chart_with_upwards_trend: +12 Bytes|
charIeszhao commented 1 month ago

The scope in PR title should be fix(experience), though