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

feat: add autocomplete attributes on passwordless form fields #747

Merged
merged 3 commits into from
Oct 6, 2023
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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)

## [0.35.5] - 2023-10-05
## [0.35.5] - 2023-10-06

### Changes

- Setting `autocomplete` in passwordless forms for email, phone and OTP

### Fixes

Expand Down
6 changes: 6 additions & 0 deletions lib/build/passwordless-shared3.js

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

Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const EmailForm = withOverride(
optional: false,
autofocus: true,
placeholder: "",
autoComplete: "email",
// We are using the default validator that allows any string
validate: defaultValidate,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ export const EmailOrPhoneForm = withOverride(
optional: false,
autofocus: true,
placeholder: "",
// We do not add an autocomplete prop in this case, since we do not really have any sensible option to set
// Setting them to either "tel" or "email" would give people the wrong impression since this could have either
// AFAIK we can't set them both at the same time
validate: defaultValidate,
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const PhoneForm = withOverride(
optional: false,
autofocus: true,
placeholder: "",
autoComplete: "tel",
validate: defaultValidate,
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export const UserInputCodeForm = withOverride(
autofocus: true,
optional: false,
clearOnSubmit: true,
autoComplete: "one-time-code",
placeholder: "",
validate: userInputCodeValidate,
},
Expand Down
Loading