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

Add well-known URL for changing passwords in admin #89

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

spaze
Copy link
Owner

@spaze spaze commented Mar 14, 2023

<admin>/.well-known/change-password will now redirect to the page where you, or actually just I, can change my password. This is for a nicer integration with 1Password.

The redirect is done in Nette so that I can redirect to presenter:action and not a URL. If the redirect would be done in server config, then it's one more place to change if the URL changes. Also not added as a one-way route to Nette because the redirection should be a temporary redirect while the one-way route redirect is a permanent one.

See the spec here https://www.w3.org/TR/change-password-url/

The redirect is done in Nette so that I can redirect to presenter:action and not a URL. If the redirect would be done in server config, then it's one more place to change if the URL changes.
Also not added as a one-way route to Nette because the redirection should be a temporary redirect while the one-way route redirect is a permanent one.

See the spec here https://www.w3.org/TR/change-password-url/
@spaze spaze self-assigned this Mar 14, 2023
@spaze spaze merged commit c73ccd7 into main Mar 14, 2023
@spaze spaze deleted the spaze/well-known-change-password branch March 14, 2023 01:11
@spaze spaze mentioned this pull request Mar 14, 2023
spaze added a commit that referenced this pull request Mar 14, 2023
Well, I'm the only one using the login forms on this site but still wanted to try these.

- Raise min length to 15 chars
- Help password managers understand the form fields
- Indicate which account is the password being changed for
- Tell 1Password to generate a bit longer+stronger password by default

TIL the `passwordrules` attribute thanks to this great @ScottHelme's blog post https://scotthelme.co.uk/boosting-account-security-pwned-passwords-and-zxcvbn/

Here are some helpful links:
- [Design your website to work best with 1Password](https://developer.1password.com/docs/web/compatible-website-design/)
- [Password Rules Validation Tool](https://developer.apple.com/password-rules/) by Apple, apparently supported in Safari [since 2018 (Safari 12)](https://webkit.org/blog/8327/safari-technology-preview-58-with-safari-12-features-is-now-available/)
- whatwg/html#3518

_This is a companion to #89._
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.

1 participant