Skip to Content
Platform.Ontology

HTTP authentication (Basic, Digest, Negotiate)

A server can make the browser ask for a username and password.

Works without askingSign in and identityLegacyWeb browsersWhen the page loadsWhile you use it

In one line

Can make your browser ask for a username and password in a plain box

A server can make the browser ask for a username and password.

Browser shows a native login box and then sends credentials on every request to that realm.

What it can and can't do

What the user does: You open a page that is protected, and a login box appears

It can

  • Show a login box from the browser itself
  • Receive the username and password you type
  • Send those details again with every request to that part of the site

It cannot

  • Get your saved passwords unless you pick them from the browser box
  • Hide the box behind a custom design; it is always the browser's own box
  • Keep you signed in after you close the browser on most setups

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported1.02008-12-11None
EdgeSupported1.0Not listedNone
FirefoxSupported1.02004-11-09None
SafariSupported1.02003-06-23None
Safari on iPhoneSupported1.02007-06-29None
Chrome on AndroidSupported1.0Not listedNone
Samsung InternetSupported1.02013-04-27None

How a site asks for it

APIWWW-Authenticate: Basic realm=...; Authorization header; Negotiate/NTLM for Windows SSO
How access is grantedprompt
What the user seesNative login dialog
Needs a secure context (HTTPS)Yes
Needs a user gestureNo
How long it lastsPer origin
How to take it backSite settings
Inside an iframeSame as top level; cross-origin iframes need a permissions policy where listed

Typical flow

  1. Call the API
  2. Browser applies its access rules
  3. Page receives the result

Data you get

What comes back: A server can make the browser ask for a username and password.
Shape: object
How often: on demand

FieldTypeUnitRangePrecision
AuthorizationstringNoneBase64 user:password for Basicsent with every request

Technical limits

  • Basic sends the password every request
  • Negotiate uses Kerberos or NTLM only on allowlisted intranet hosts

The story

What it is

The server makes your browser pop up a plain username and password box.

For you

A grey box from the browser itself appears with 'username' and 'password'. After you type, the browser silently resends them on every click on that site until you close it. Many people meet this on staging sites, routers and old company tools.

For makers

It is the quickest way to password protect something with no login page to build. Makers use it for private previews, internal dashboards, device admin pages and simple APIs.

Where you see it

TypeExampleApps
developerA web agency hides a client's unfinished site behind a browser login box so only the client can look at it.Netlify, Vercel previews
smart-homeA home router or camera admin page asks for a username and password in a plain box when you type its local address.None named
enterpriseA company's internal wiki on an old server uses single sign on through the browser, so staff on the work network are let in without typing.None named
gamesA game studio shares a private playtest build on a password box so only invited testers see the unreleased game.None named
analyticsA reporting tool lets a script fetch data using the same method, so a person and a program use one login style.None named
securityA scanner tries common default passwords on these boxes, so the same simple gate that protects can also be attacked.None named

Risks

  • Password resent on every request
  • No sign out button

What the platform says

Good uses and abuse

Legitimate uses

  • Intranet SSO
  • Simple gating

Known abuse

  • Phishing with credentials in URL (restricted)

Scores

ScoreValueMeaning
Sensitivity4 of 5How revealing the data is
Utility2 of 5How useful it is to honest apps
Friction2 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 1996, Chrome 1: Basic and Digest from the start
  • 2017, Chrome 59: Credentials in URLs (user:pass@host) blocked for subresources

Sources

How well checked: Based on official documentation.

On this page