logto-io / logto

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

refactor(experience): add hidden identifier input for browser password manager #6165

Open xiaoyijun opened 5 days ago

xiaoyijun commented 5 days ago

Summary

This PR introduces a new HiddenIdentifierInput component to enhance the user experience with browser password managers. The component is integrated into the password setting flows, both in the standard and lite versions.

These changes ensure that browser password managers accurately store and autofill user credentials, improving user experience and security.

Testing

Test locally.

For new registered user: image

For password reset: image

Checklist

github-actions[bot] commented 5 days ago

COMPARE TO master

Total Size Diff :chart_with_downwards_trend: -15.17 KB

Diff by File |Name|Diff| |---|---| |.github/workflows/alteration-compatibility-integration-test.yml|0 Bytes| |.github/workflows/changesets.yml|0 Bytes| |.github/workflows/commitlint.yml|0 Bytes| |.github/workflows/integration-test.yml|0 Bytes| |.github/workflows/main.yml|0 Bytes| |.github/workflows/master-codecov-report.yml|0 Bytes| |.github/workflows/release.yml|0 Bytes| |.github/workflows/upload-annotations.yml|0 Bytes| |packages/console/src/assets/docs/guides/spa-react/README.mdx|:chart_with_downwards_trend: -72 Bytes| |packages/console/src/mdx-components/Mermaid/index.tsx|:chart_with_downwards_trend: -390 Bytes| |packages/core/src/routes/experience/classes/experience-interaction.ts|:chart_with_downwards_trend: -6.03 KB| |packages/core/src/routes/experience/classes/verifications/index.ts|:chart_with_downwards_trend: -1.06 KB| |packages/core/src/routes/experience/classes/verifications/password-verification.ts|:chart_with_downwards_trend: -3.24 KB| |packages/core/src/routes/experience/classes/verifications/verification-record.ts|:chart_with_downwards_trend: -525 Bytes| |packages/core/src/routes/experience/const.ts|:chart_with_downwards_trend: -181 Bytes| |packages/core/src/routes/experience/index.ts|:chart_with_downwards_trend: -2.35 KB| |packages/core/src/routes/experience/middleware/koa-experience-interaction.ts|:chart_with_downwards_trend: -1.14 KB| |packages/core/src/routes/experience/types.ts|:chart_with_downwards_trend: -123 Bytes| |packages/core/src/routes/experience/utils.ts|:chart_with_downwards_trend: -587 Bytes| |packages/core/src/routes/experience/verification-routes/password-verification.ts|:chart_with_downwards_trend: -1.43 KB| |packages/core/src/routes/init.ts|:chart_with_downwards_trend: -254 Bytes| |packages/core/src/routes/interaction/utils/interaction.ts|:chart_with_downwards_trend: -268 Bytes| |packages/experience/src/Providers/UserInteractionContextProvider/UserInteractionContext.tsx|:chart_with_downwards_trend: -1.61 KB| |packages/experience/src/Providers/UserInteractionContextProvider/index.tsx|:chart_with_downwards_trend: -1.46 KB| |packages/experience/src/components/InputFields/SmartInputField/use-smart-input-field.ts|:chart_with_downwards_trend: -233 Bytes| |packages/experience/src/containers/ForgotPasswordLink/index.tsx|:chart_with_downwards_trend: -474 Bytes| |packages/experience/src/containers/SetPassword/HiddenIdentifierInput.tsx|:chart_with_downwards_trend: -851 Bytes| |packages/experience/src/containers/SetPassword/Lite.tsx|:chart_with_downwards_trend: -93 Bytes| |packages/experience/src/containers/SetPassword/SetPassword.tsx|:chart_with_downwards_trend: -93 Bytes| |packages/experience/src/containers/VerificationCode/PasswordSignInLink.tsx|:chart_with_downwards_trend: -220 Bytes| |packages/experience/src/containers/VerificationCode/index.tsx|:chart_with_downwards_trend: -36 Bytes| |packages/experience/src/hooks/use-check-single-sign-on.ts|0 Bytes| |packages/experience/src/hooks/use-global-redirect-to.ts|:chart_with_downwards_trend: -510 Bytes| |packages/experience/src/hooks/use-send-verification-code.ts|:chart_with_downwards_trend: -37 Bytes| |packages/experience/src/hooks/use-session-storages.ts|:chart_with_downwards_trend: -303 Bytes| |packages/experience/src/pages/Continue/SetEmailOrPhone/index.tsx|:chart_with_downwards_trend: -273 Bytes| |packages/experience/src/pages/Continue/SetUsername/index.tsx|:chart_with_downwards_trend: -274 Bytes| |packages/experience/src/pages/ForgotPassword/ForgotPasswordForm/index.test.tsx|:chart_with_downwards_trend: -148 Bytes| |packages/experience/src/pages/ForgotPassword/ForgotPasswordForm/index.tsx|:chart_with_downwards_trend: -379 Bytes| |packages/experience/src/pages/ForgotPassword/index.test.tsx|:chart_with_downwards_trend: -541 Bytes| |packages/experience/src/pages/ForgotPassword/index.tsx|:chart_with_downwards_trend: -4 Bytes| |packages/experience/src/pages/Register/IdentifierRegisterForm/index.test.tsx|:chart_with_downwards_trend: -580 Bytes| |packages/experience/src/pages/Register/IdentifierRegisterForm/index.tsx|:chart_with_downwards_trend: -403 Bytes| |packages/experience/src/pages/ResetPassword/index.tsx|:chart_with_downwards_trend: -363 Bytes| |packages/experience/src/pages/SignIn/IdentifierSignInForm/index.test.tsx|:chart_with_downwards_trend: -722 Bytes| |packages/experience/src/pages/SignIn/IdentifierSignInForm/index.tsx|:chart_with_downwards_trend: -402 Bytes| |packages/experience/src/pages/SignIn/IdentifierSignInForm/use-on-submit.ts|:chart_with_downwards_trend: -139 Bytes| |packages/experience/src/pages/SignIn/PasswordSignInForm/index.tsx|:chart_with_downwards_trend: -272 Bytes| |packages/experience/src/pages/SignInPassword/PasswordForm/index.test.tsx|:chart_with_downwards_trend: -42 Bytes| |packages/experience/src/pages/SignInPassword/PasswordForm/index.tsx|:chart_with_downwards_trend: -266 Bytes| |packages/experience/src/pages/SignInPassword/index.test.tsx|:chart_with_downwards_trend: -320 Bytes| |packages/experience/src/pages/SignInPassword/index.tsx|:chart_with_downwards_trend: -26 Bytes| |packages/experience/src/pages/VerificationCode/index.test.tsx|:chart_with_downwards_trend: -516 Bytes| |packages/experience/src/pages/VerificationCode/index.tsx|:chart_with_downwards_trend: -29 Bytes| |packages/experience/src/types/guard.ts|:chart_with_downwards_trend: -226 Bytes| |packages/integration-tests/src/client/experience/const.ts|:chart_with_downwards_trend: -165 Bytes| |packages/integration-tests/src/client/experience/index.ts|:chart_with_downwards_trend: -1.25 KB| |packages/integration-tests/src/helpers/client.ts|:chart_with_downwards_trend: -414 Bytes| |packages/integration-tests/src/helpers/experience/index.ts|:chart_with_downwards_trend: -812 Bytes| |packages/integration-tests/src/tests/api/experience-api/sign-in-with-password-verification/happy-path.test.ts|:chart_with_downwards_trend: -1.18 KB| |packages/integration-tests/src/tests/api/experience-api/verifications/password-verification.test.ts|:chart_with_downwards_trend: -1.13 KB| |packages/phrases/src/locales/en/errors/session.ts|:chart_with_downwards_trend: -124 Bytes| |packages/schemas/src/types/interactions.ts|:chart_with_downwards_trend: -2.06 KB|