userstyles.world
userstyles.world copied to clipboard
Add support for well-known URI "change-password"
Describe the change you'd like:
This should be quite a simple change. Redirect /.well-known/change-password
to /account#password
. This is just a quality-of-life improvement that makes changing your password a little easier.
Additional context:
@vednoc Should we handle these URLs on Nginx. I don't think we want to implement this on the server.
Done. Try it out: https://userstyles.world/.well-known/change-password
So, I tried it out and I noticed some strange things:
- If I was logged out and used the shortcut it takes me to
/login?r=%2Faccount#password
and after logging in it takes me to the account page but the section header#password
is discarded so you have to scroll down to get to the password section. - However even if I'm already logged in it still takes me to the login url as described above when it should just take me right to
/account#password
.
Ah! I just assumed it would work and went to bed. Thank you so much for testing it.
- We should use
new URLSearchParams(location.search + location.hash).get('r')
inlogin.ts
file. Maybe there's a better way to do it. - That could be because of CSP rules. @Gusted, is that correct?
Figured it out! The second point is because of SameSite attribute of our cookie, not CSP rules. Here's a relevant read: https://web.dev/samesite-cookies-explained I'll deploy changes to production later.