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

Allow special characters in passkey alias #2387

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

frederikrothenberger
Copy link
Member

@frederikrothenberger frederikrothenberger commented Mar 26, 2024

This PR loosens the restrictions on passkey aliases to allow for special characters.


🟡 Some screens were changed

// Can have hyphen(s), space(s) or underscore(s) in the middle.
// Good examples: "2019_macbook", "2019-Macbook", "2019 Macbook"
// Bad examples: "2019 macbook!", "2010 macbook_", "space trails at end "
export const validateAlias = (
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this got even simpler and was not used anywhere else I moved the function into the alias component.

This PR loosens the restrictions on passkey aliases to allow
for special characters.
@frederikrothenberger frederikrothenberger changed the title Allow special character in passkey alias Allow special characters in passkey alias Mar 26, 2024
Copy link
Collaborator

@lmuntaner lmuntaner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess there are no issues in the backend with special characters, right?

Are spaces at the end trimmed? Should we do so?

It might be confusing if a user adds white spaces at the end and then forgets about it...

@frederikrothenberger
Copy link
Member Author

I guess there are no issues in the backend with special characters, right?

Are spaces at the end trimmed? Should we do so?

It might be confusing if a user adds white spaces at the end and then forgets about it...

  1. Yes, the back-end does not care
  2. Spaces are trimmed (front and back). The alternative would be to show an error and have the user manually trim the value, but honestly that is just tedious. There is a check to make sure that the value is not all white space (and gets trimmed to empty). Given it is only used as a display value, I highly doubt users care (or even think about intentionally) about trailing white space.

@frederikrothenberger frederikrothenberger added this pull request to the merge queue Mar 27, 2024
Merged via the queue into main with commit 08d6bf8 Mar 27, 2024
65 checks passed
@frederikrothenberger frederikrothenberger deleted the frederik/allow-special-alias branch March 27, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants