diff --git a/src/locales/en.json b/src/locales/en.json index bd995ecb..abc58575 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -20,7 +20,7 @@ "identities.messages.1010005": "Verify", "identities.messages.1010006": "Authentication code", "identities.messages.1010007": "Backup recovery code", - "identities.messages.1010008": "Use security key", + "identities.messages.1010008": "Sign in with hardware key", "identities.messages.1010009": "Use Authenticator", "identities.messages.1010010": "Use backup recovery code", "identities.messages.1010011": "Continue with security key", @@ -131,7 +131,7 @@ "identities.messages.4070006": "The verification code is invalid or has already been used. Please try again.", "identities.messages.5000001": "{reason}", "login.forgot-password": "Forgot password?", - "login.logged-in-as-label": "You're logged in as:", + "login.logged-in-as-label": "You are using:", "login.logout-button": "Logout", "login.logout-label": "Something's not working?", "login.registration-button": "Sign up", diff --git a/src/react-components/ory/helpers/user-auth-form.tsx b/src/react-components/ory/helpers/user-auth-form.tsx index 52990a6f..2d85a3e7 100644 --- a/src/react-components/ory/helpers/user-auth-form.tsx +++ b/src/react-components/ory/helpers/user-auth-form.tsx @@ -69,19 +69,9 @@ export const UserAuthForm = ({ formFilterOverride, className, ...props -}: UserAuthFormProps): JSX.Element => ( -
{ - if (e.key === "Enter" && !submitOnEnter) { - e.stopPropagation() - e.preventDefault() - } - }} - {...(onSubmit && { - onSubmit: (event: React.FormEvent) => { +}: UserAuthFormProps): JSX.Element => { + const submitHandler = onSubmit + ? (event: React.FormEvent) => { event.preventDefault() const form = event.currentTarget @@ -108,23 +98,37 @@ export const UserAuthForm = ({ } onSubmit({ body, event }) - }, - })} - {...props} - > - <> - {/*always add csrf token and other hidden fields to form*/} -