mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
Safari, Chrome, and Firefox only offer to save passwords when they see a real form submission with page navigation, not fetch() + redirect. After the change-password API call succeeds, dynamically create a form with the username and new password (autocomplete=username + new-password), POST it to "/" causing a real navigation. The browser detects the form submission with credential fields and prompts to save. Also make the username field visible (read-only) on the change-password page since Safari ignores hidden inputs for password detection, and add autocomplete attributes to the login page fields.