How FAPI combines OAuth mechanisms
FAPI 2.0OpenID Foundation security profiles that fix how OAuth and OpenID Connect are combined for high-risk APIs, such as open banking. FAPI 2.0 requires choices such as PAR, PKCE and sender-constrained tokens, and conformance tests check that a deployment follows them. invents almost nothing: nearly every requirement takes a mechanism an earlier lesson explained and makes it mandatory, or takes an option away. This lesson follows Ava's 42.50 EUR photo book payment through Lakeside Bank under the profile, traces each requirement to the mechanism behind it, and explains the few places where the profile goes against habit.
Pay by bank, step by step
The clearest way to see how FAPI 2.0 combines earlier mechanisms is to follow one payment from start to finish. Suppose Lakeside Bank's ecosystem adopts FAPI 2.0. Much of the Pay by bank flow from Describing access with authorization details stays as it was: the pushed request, the payment_initiation details, and the printer's client assertion signed with its key printer-2026-10. The most visible change is the token. A bearer tokenA token that works for whoever presents it: the API checks that the token is genuine and current, not who is holding it. That is why bearer tokens must be kept from being copied. like demo-bank-access-token-3 is no longer allowed, because the profile requires every access tokenA token that a client presents to an API to use access it has been granted, usually limited in what it allows and how long it lasts. It authorizes API calls; it does not tell the client who signed in. to be sender-constrained. Lakeside chooses DPoPAn OAuth extension, RFC 9449, that binds tokens to a key pair the client holds. The client signs a fresh proof for each request, so a stolen token is useless without the private key. for that and keeps private_key_jwt for client authenticationChecking evidence that someone, or some application, controls an account, such as a password or a passkey. It establishes which account is being used, not what that account may do.. FAPI 2.0 lets each deployment make those two choices independently: mutual TLSTransport Layer Security, the protection behind HTTPS. It encrypts traffic between two connected systems, detects changes on the way, and uses certificates so the client can confirm which server it reached. or private_key_jwt to authenticate clients, and mutual TLS or DPoP to bind tokens.
All domains, identifiers, and values in these examples are fictional. Ava chooses Pay by bank for her 42.50 EUR photo book and picks Lakeside Bank:
- Configuration. The printer reads Lakeside's metadata document from
https://auth.lakeside-bank.example/.well-known/oauth-authorization-server, using an issuerThe party that creates and signs a token, assertion, or certificate, named in a token's iss claim. A recipient must check that the issuer is exactly the one it expected and trusts. it holds in its own trusted configuration, and checks that the document'sissuermatches. Every endpoint below comes from that document. - Push. The printer's backend sends the entire authorizationDeciding whether a requested action is permitted, such as whether a signed-in account may delete a particular photo. Authentication says which account is asking; authorization decides what it can do. request to Lakeside's PARAn OAuth extension, RFC 9126, in which the client sends its authorization request straight to the authorization server and gets back a short-lived request_uri. The browser carries only that reference, so the parameters cannot be read or changed on the way. endpoint:
response_type=code, its redirect URIhttps://printer.example/pay/callback, a PKCEProof Key for Code Exchange, pronounced pixie: the client creates a secret for each authorization attempt, sends only a hash of it at the start, and proves it holds the secret when redeeming the code, so a stolen authorization code is useless to anyone else. challenge usingS256, and the payment details. It authenticates with a client assertion whoseaudis Lakeside's issuer identifier,https://auth.lakeside-bank.example, and attaches a DPoP proof so the authorization codeA short-lived, single-use value that the authorization server sends back to a client through the browser. The client swaps it for tokens in a direct request to the authorization server; APIs never accept it. will be bound to its DPoP key. Lakeside answers with arequest_urithat expires in under ten minutes. - Visit. Ava's browser goes to Lakeside's authorization endpoint carrying only the client ID and the
request_uri. Lakeside refuses any authorization request that did not arrive this way. - Approve. Ava signs in to Lakeside and approves paying 42.50 EUR to Photo Printer, once.
- Return. Lakeside redirects Ava's browser back with a code and an
issparameter. The printer comparesissexactly with the issuer saved for this attempt before doing anything else. The code lasts at most 60 seconds and works only once. - Exchange. The printer redeems the code with another client assertion, its PKCE verifier, and a fresh DPoP proof from the same key. The access token comes back with
token_typeDPoP, where the earlier example receivedBearer. - Pay. The printer calls Lakeside's payment APIAn application programming interface: a defined way for software to interact with a service. A web API offers endpoints where other programs send HTTP requests. with the token in the
Authorizationheader and a new proof. The API checks the token and its binding before acting.
The only part of this flow that passes through Ava's browser on the way to Lakeside is short:
https://auth.lakeside-bank.example/authorize
?client_id=photo-printer-pay
&request_uri=urn%3Aietf%3Aparams%3Aoauth%3Arequest_uri%3Ademo-lakeside-request-5The amount, the payee, the redirect URI, and the PKCE challenge all traveled in the pushed request, directly from the printer's backend to Lakeside over an authenticated connection. Nothing the browser carries can change them.
Where each requirement comes from
Behind those steps are FAPI 2.0 requirements, and each one builds on an earlier lesson or group:
| FAPI 2.0 requires | Explained in |
|---|---|
| Confidential clients only. Public clients are outside the profile. | Public and confidential clients |
| Endpoints from the metadata document, with its issuer checked against a trusted value. | Authorization server metadata |
Every authorization request pushed with client authentication and a redirect URI. The browser carries only client_id and request_uri, which expires in under 600 seconds. | Pushed Authorization Requests (PAR) |
PKCE with S256. | Proof Key for Code Exchange (PKCE) |
response_type=code and nothing else. | The authorization request |
iss in every authorization response, checked by the client. | Authorization response issuer identification |
| Codes that work once and last no more than 60 seconds. | Redirects and authorization codes |
Client authentication by mutual TLS or private_key_jwt, with the issuer identifier as the assertion's aud, as a single string. | Mutual TLS, and Secrets and signed assertions |
| Sender-constrained access tokens only, by mutual TLS or DPoP. Servers using DPoP must support binding the code to the DPoP key. | Demonstrating Proof of Possession (DPoP), and Certificate-bound access tokens |
Access tokens in the Authorization header, never in a URL query. | Using access tokens |
| No password grant, and no open redirectors at the client or the server. | Choosing a flow, Redirect URI validation, and OAuth security best practices |
Signatures with PS256, ES256, or EdDSA using Ed25519, never none. RSA keys of at least 2048 bits and elliptic curve keys of at least 224 bits. | Token formats and validation |
Beneath all of it, every party uses TLS 1.2 or later and checks server certificates properly. Where scopes cannot express what the client needs, the profile recommends Rich Authorization Requests, which is why the payment already travels as payment_initiation details rather than a scope.
Where FAPI departs from habit
A few requirements go against what earlier lessons treated as normal, and each has a reason.
state is not the CSRF defense. Correlating requests and responses noted that a client may rely on PKCE instead of state once it knows the server enforces PKCE. Every FAPI server must, so the profile relies on PKCE alone, with the challenge generated for each request and bound to the browser session that started it. A client may still use state to carry its own application state.
Servers do not rotate refresh tokens. The refresh token grant presented rotation as a way to notice theft. FAPI 2.0 prohibits it except in extraordinary circumstances, such as a migration between systems. Its clients are confidential and its tokens are sender-constrained, so a stolen refresh token is already useless without the client's own credentials, and rotation adds only a failure mode: a client that loses the response carrying its new refresh token has no working one left. When a server must rotate, it has to let clients retry with the old refresh token for a limited time, and clients must be able to cope with rotation for those occasions.
Clocks get a stated tolerance. Even a fraction of a second of clock difference can make a JWT look as though it was issued in the future. Authorization servers must accept JWTs whose iat or nbf is up to 10 seconds ahead of their clock, and must reject any more than 60 seconds ahead, so that no one solves clock trouble by switching the check off.
Signed requests and responses are optional. Using JAR with PAR told the request half of this change: FAPI 1.0's advanced profile required signed request objects, and FAPI 2.0 replaced them with pushed requests that never travel through the browser. Protecting an authorization response told the response half: FAPI 1.0 Advanced protected responses with a signature, from JARM or from an ID token, while FAPI 2.0 reduces the response to a code protected by PKCE, iss, and a short lifetime. Ecosystems that also need non-repudiation, a record that the printer itself asked for this exact payment, can add FAPI 2.0 Message Signing, a final specification since September 2025. It signs the pushed request with JAR, the authorization response with JARM, introspection responses as JWTs, and ID tokens. The signed pushed request is the record: it carries the payment details the printer asked to have approved, so the bank can show later that this client asked for this exact payment. The calls to the payment API itself are outside the profile; an ecosystem that also wants each API call signed sets that out in its own standard.
FAPI 1.0 Advanced and FAPI 2.0
Ecosystems that went live before FAPI 2.0 was final often still run FAPI 1.0 Advanced, and a client like the printer may have to connect to banks on both for years while an ecosystem migrates. The two profiles aim at the same protection, a payment that only the right client can start and only for what the customer approved, but they reach it differently:
| Concern | FAPI 1.0 Advanced | FAPI 2.0 |
|---|---|---|
| Protecting the authorization request | A signed request object (JAR) on every request | Every request pushed with PAR; signing it is optional |
| Response type | The hybrid flow, code id_token, or code with JARM | code only |
| Protecting the authorization response | A signature: the ID token in the response carries c_hash, a hash of the code, and s_hash, a hash of state, so it signs values that travel beside it, or the whole response is a JARM JWT | PKCE with S256, the iss response parameter, and a short-lived, single-use code |
| Client authentication | Mutual TLS or private_key_jwt | Mutual TLS or private_key_jwt |
| Access tokens | Certificate-bound with mutual TLS | Sender-constrained with mutual TLS or DPoP |
| Calls to the API | x-fapi-* headers such as x-fapi-interaction-id for correlation, and the customer's IP address and last sign-in time | Not required by the profile; an ecosystem's own API standard may still define them |
| Basis for the requirements | Defenses against known attacks | A formal attacker model, with the mechanisms analyzed against it |
The biggest practical difference for the printer is the browser leg. Under FAPI 1.0 Advanced it builds and signs a request object, sends it through the browser or pushes it, and then validates a signed ID token or JARM response before it trusts the code. Under FAPI 2.0 it pushes a plain request over an authenticated connection and checks iss, while the binding of the code to its PKCE verifier and DPoP key does the rest. A client that supports both keeps two response validation paths and has to know, from each bank's metadata, which one applies.
Neither profile is a new protocol. Each is the OAuth of the OAuth 2.0 and Advanced OAuth lessons, with the choices made once and written down.
Check your understanding
Try these questions before moving on. If an answer isn't right, use the feedback and try again.
Try it in the Lab
- Protect a print-service flow with the FAPI 2.0 profileValidate metadata, push a payment with an assertion and DPoP, redeem and call the print API, then verify binding failures and the FAPI profile's refresh behavior.