3 ms·
Why is this better than a session cookie? Basic auth is a pretty wonky user experience. Hard to customize the prompt and "logout" is awkward.
by eli 8y ago
Why is this better than a session cookie? Basic auth is a pretty wonky user experience. Hard to customize the prompt and "logout" is awkward.
- antsar 8y agoI didn't say it's better :) Just an alternative. One way to handle logout (without closing the browser) is to have a logout link with a destination of "https://bad_username:bad_password@example.com" https://bad_username:bad_password@example.com". I believe this causes the browser to forget the original (valid) credentials and attempt authentication with the invalid credentials. This will fail, and produce a new login prompt. Then you have to close the prompt, and close the subsequent "401" page. So yeah, it is awkward.
- eli 8y agoFair enough. I think modern browsers warn on links with username/password. The UX for basic auth is so bad it is not really a usable feature