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

Make login/registration page password manager friendly #1534

Closed
Valodim opened this issue Jul 25, 2023 · 6 comments
Closed

Make login/registration page password manager friendly #1534

Valodim opened this issue Jul 25, 2023 · 6 comments

Comments

@Valodim
Copy link

Valodim commented Jul 25, 2023

Problem and impact

The login and registration forms are both on the same page, and share a <form> element. That's not a technical issue per se, but throws off the login form detection algorithms of password managers since they'd have to distinguish different sets of inputs for different purposes.

(It's also semantically less nice markup than it could be, but that alone certainly wouldn't be worth any effort 🤷)

image

Proposed solution / feature

Use two separate <form> elements for the login and registration forms

Context or examples

pretalx logins are bound to events thus fairly short lived by nature, so it's particularly convenient to have a quick signup/login process.

@jfowl
Copy link

jfowl commented Sep 13, 2023

It may already/also help password managers (including in-browser ones) to use the proper autocomplete parameters on the inputs:

autocomplete="username"
autocomplete="new-password"
autocomplete="current-password"

@rixx
Copy link
Member

rixx commented Sep 14, 2023

Alright, let's see if using the correct autocomplete hints will maybe fix the password manager problem.

@rixx rixx changed the title Use separate forms for login and registration Make login/registration page password manager friendly Sep 14, 2023
@rixx rixx closed this as completed in d3efe3c Sep 14, 2023
@Valodim
Copy link
Author

Valodim commented Sep 14, 2023

As developer of a password manager, I'll say that it's unlikely. Groups of fields with distinct semantics within the same <form> will always yield mixed results at best.

Worth mentioning also, that the autocomplete hints are not nearly reliable enough to take for granted - the web is messy, and whatever assumptions you make about them, there will be a page that breaks that intentionally or not. For that reason they are only used as an input to form matching heuristics, not fully relied upon.

Anyways, I'll check if this helped in our case when I see this shipped, and possibly reopen if it didn't. Thanks!

@rixx
Copy link
Member

rixx commented Sep 14, 2023

Sounds good – thanks! I suppose we can also pull this apart into two HTML forms while keeping the single Django form. How would we indicate which form is which in that case, though? What would help the password manager decide which form is which, if autocomplete hints don't work?

@Valodim
Copy link
Author

Valodim commented Sep 14, 2023

If there are two forms, both of them will be straightforward to detect for what they are :)

@rixx
Copy link
Member

rixx commented Sep 14, 2023

I pushed a WIP addressing this request in https://github.com/pretalx/pretalx/tree/auth-form – it's WIP because the most-relevant place this form appears in, the CfP flow, doesn't actually use that template as form, and instead provides its own form element several template layers up. Tearing that out/down is going to be a major hassle, so I'd prefer to avoid it if at all possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants