Skip to content

Comment on Using www-authenticate for user authenticationparent

Comments

You can serve this style of login from a front page, but then the user gets the unstyled, limited context browser prompt before they see your site.

There's no button to create a new account or find a forgotten password. There's no reasonable way to logout. It's usable for a site with a trainable user base, like a small club or employees, but I wouldn't expect anything intended for public use to do it. I've experienced one public site that used it for its members only (subscription) content, but I think they've switched to forms and cookies.

From the article:

the nice thing about this is that the browser will keep sending the credentials to subsequent requests of the same domain until it receives a 401 status as response.

The logout button can simply redirect to a static page that returns a 401.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.