API authentication
medium 24 minAuthentication answers one question about every API call: who is asking?
Where it shows up
The same pattern appears across everyday software.
GitHub
Its REST API accepts personal access tokens, OAuth app tokens and GitHub App tokens, so one API serves scripts, third-party apps and bots.
Sign in with Google
Google's sign-in follows OpenID Connect: the app receives an ID token that says who the user is, and never sees the password.
Kubernetes service accounts
Pods receive short-lived JWTs bound to an audience, and the API server verifies them.
AWS requests
AWS callers sign each request with a secret key (Signature Version 4) instead of sending the secret.
Online banking
Banks commonly add a second factor and end idle sessions quickly, because a stolen session costs money.
A school bus tracker
Buses use a key per device, parents use a mobile login, and a mapping partner gets OAuth access to routes only.