When must the authorization server check which client a refresh token belongs to?
Refresh token binding verified when the client is authenticatedRFC 6749 §10.4MUSTRoles: authorization_server
Requirement as recorded in the ProtocolSoup registry
The authorization server MUST verify the binding between the refresh token and client identity whenever the client identity can be authenticated.
Read §10.4 in RFC 6749Self-test verdict
PassCommit 00bac3fEvaluated
This is ProtocolSoup's result against its own implementation at the commit shown. It is not a certification of ProtocolSoup or of any other product.
Captured from production
Captured Commit 00bac3f
Captured from the deployed ProtocolSoup at the commit shown. Every request and response is shown exactly as sent and received.
Passing exchange
Accepted, as requiredConformance client
The conformance client obtains tokens as demo-app and refreshes them authenticated as demo-app, the client the refresh token was issued to.
Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.
1.POST https://protocolsoup.com/oauth2/token200 OK
TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2
Request
POST /oauth2/token HTTP/2.0 Authorization: Basic ZGVtby1hcHA6OXh2TTdNYXZPSXYyc0xoODFBUnBLNHRabUJKV2ZVSnA= Content-Length: 689 Content-Type: application/x-www-form-urlencoded Host: protocolsoup.com User-Agent: ProtocolSoup-Conformance-Client/1 grant_type=refresh_token&refresh_token=eyJhbGciOiJSUzI1NiIsImtpZCI6InJzYS05YTJlNThlYzVjNjk3NGJmIiwidHlwIjoiSldUIn0.eyJjbGllbnRfaWQiOiJkZW1vLWFwcCIsImV4cCI6MTc5NzE2OTAxMCwiaWF0IjoxNzk2NTY0MjEwLCJpc3MiOiJodHRwczovL3Byb3RvY29sc291cC5jb20iLCJqdGkiOiJyZWZyZXNoLWYwZjNlYjA5OWYwYmU4MzIiLCJzY29wZSI6InByb2ZpbGUiLCJzdWIiOiJhbGljZSIsInR5cGUiOiJyZWZyZXNoIn0.rqGpeXLOW9qQw_--GqEkE4sMfyVHVK2m6IMXpx_DIdTWMmkaqgo5Ue1JwoVAFGAQxnbqa1oD9A2lPfqbyzwnAuS3aJVy-5A9r3kz_RcRPATvnbdcpZXRTolN4iXCYNMgRxFTnjCPwlFcwSS89_Oi-2eCztE-nAVbCdg3DE1ikkC-V17QTXeT_D_7RscjzKU6vsNtjRqsJmBU4Of0vU2SqshrvEQm-hiKpRci4kXXxttW5gZqsSJg4TQfyDPdmPxqbgJ4uKPZnRIufmwG5RFn2dLOs7EsZULBkV_FZAotrZIAKSuv5Dot-jOsf_a3_Ztp0f1_GgERPJWNUnSL7DFUrQ
Response
HTTP/2.0 200 OK Cache-Control: no-store Cf-Cache-Status: DYNAMIC Cf-Ray: a65bae90582c3cdb-MSP Content-Type: application/json Date: Sun, 06 Dec 2026 13:36:51 GMT Fly-Request-Id: 01M95S4NJZPS9PKVY21MD8Q5CR-ord Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800} Pragma: no-cache Referrer-Policy: strict-origin-when-cross-origin Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=9BsEulu%2F3HVAn07iHohs8gJtc5rPv7HPNh1QJO5x4S%2FtwdrSvyxajak8SDi8M0S9j2MFZ93y2D6doY4fx2WFRZ7t6VFIKSF8GZ%2F01nel7Dg0dWZirO18Up%2F97eYnOy0G5xk%3D"}]} Server: cloudflare Server-Timing: cfCacheStatus;desc="DYNAMIC" Server-Timing: cfEdge;dur=2,cfOrigin;dur=236 Vary: Origin Vary: accept-encoding Via: 1.1 fly.io, 1.1 fly.io X-Content-Type-Options: nosniff X-Frame-Options: DENY X-Xss-Protection: 1; mode=block {"access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6InJzYS05YTJlNThlYzVjNjk3NGJmIiwidHlwIjoiYXQrand0In0.eyJhdWQiOiJodHRwczovL3Byb3RvY29sc291cC5jb20vb2F1dGgyL3Jlc291cmNlIiwiYmlydGhkYXRlIjoiMTk5MC0wMy0xMiIsImNsaWVudF9pZCI6ImRlbW8tYXBwIiwiZXhwIjoxNzk2NTY3ODExLCJmYW1pbHlfbmFtZSI6IkpvaG5zb24iLCJnZW5kZXIiOiJmZW1hbG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bnRfaWQiOiJkZW1vLWFwcCIsImV4cCI6MTc5NzE2OTAxMSwiaWF0IjoxNzk2NTY0MjExLCJpc3MiOiJodHRwczovL3Byb3RvY29sc291cC5jb20iLCJqdGkiOiJyZWZyZXNoLWQ1NzhhYmZiODhmMjZmYTgiLCJzY29wZSI6InByb2ZpbGUiLCJzdWIiOiJhbGljZSIsInR5cGUiOiJyZWZyZXNoIn0.jC6-6TdaqWVETJWmTLJNfGu14yZcpfVV1Wuzj9nt1Q4XGEOAlZO_cUHTpBP99YoSiYU2v62Q8QotQQ4EE1idsOKAcoVxvGI7pV5qPB3un_o1ddUeMZm0EwcyZEsLRfSRMJje2AaGBFCrAlUAOoMiX9QG_zbHb4DFV_lvf8-gHMIf2jux2oec4djRItfXet_s9fd3H8eZsE1B2Oof84uRc_3fRRFHzHww3N4fv23pAHP5nv2OtRwKS230zqxpEHXEVs4MZ_iq3cStZuURcuBPflZdlpvNRpmwTrZ9yLnWpUOtE7TzzrXhAdrRs1svmY701cwNBhd89tFHY5zkhU-C4g","scope":"profile"}
Failing exchange
Rejected, as requiredConformance client
The conformance client obtains tokens as public-app, then presents the refresh token as demo-app, authenticated over HTTP Basic with demo-app's real client password. The refresh token was not issued to the authenticated client, and it stays valid for the client it was issued to.
Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.
1.POST https://protocolsoup.com/oauth2/token400 Bad Request
TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2
Request
POST /oauth2/token HTTP/2.0 Authorization: Basic ZGVtby1hcHA6OXh2TTdNYXZPSXYyc0xoODFBUnBLNHRabUJKV2ZVSnA= Content-Length: 692 Content-Type: application/x-www-form-urlencoded Host: protocolsoup.com User-Agent: ProtocolSoup-Conformance-Client/1 grant_type=refresh_token&refresh_token=eyJhbGciOiJSUzI1NiIsImtpZCI6InJzYS05YTJlNThlYzVjNjk3NGJmIiwidHlwIjoiSldUIn0.eyJjbGllbnRfaWQiOiJwdWJsaWMtYXBwIiwiZXhwIjoxNzk3MTY5MDE2LCJpYXQiOjE3OTY1NjQyMTYsImlzcyI6Imh0dHBzOi8vcHJvdG9jb2xzb3VwLmNvbSIsImp0aSI6InJlZnJlc2gtNmIzODgxNjgzMWUxOGYzYSIsInNjb3BlIjoicHJvZmlsZSIsInN1YiI6ImFsaWNlIiwidHlwZSI6InJlZnJlc2gifQ.f_OvKuKEJS5kywLwwon9yz2ZlR6DCOCbcrn6w-20x-SuS2Gg4QiO7T36vv1CeYn0ZZk00pGfpDjxN_11KVVG4n3ihFoKd2NWlgvSD0ggR5j1BxuCBQIHIuERYlrFPBFoYCflVPCX83j03Kt84KVHX-F8IyxhFez-k5TkyPqHQuDGK4OxgRau2zkVMoX8hCVz4dFYe9PiT8cRk7rfgA4OhugM924CuXJW7nAhCi99kzGatPVgeN0DEb2n8F7Q0E1CsdwrtUa6o1SC73iG8LwitxDCqpWrbVBshsLf4fHb1hTV54dNyemQV1382uQFfBUBWXOGiNz15SOgEGEBnJFLcQ
Response
HTTP/2.0 400 Bad Request Cache-Control: no-store Cf-Cache-Status: DYNAMIC Cf-Ray: a65baebc1fd13cdb-MSP Content-Type: application/json Date: Sun, 06 Dec 2026 13:36:58 GMT Fly-Request-Id: 01M95S4WDXG7CE7WE04XNRD79P-ord Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800} Pragma: no-cache Referrer-Policy: strict-origin-when-cross-origin Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=EAbZMcQbyx8Nvxgtkm7%2BWPohrNAHiNX6F6JfhlF7IwvGfFj5mZDg6rGwOTem5kyZian5NIHESiso5dXfqDVwsomcQg%2FXbJuilyqDdbwU4e4ZicXeSC9HEoOZTVJ7K%2BNcckk%3D"}]} Server: cloudflare Server-Timing: cfCacheStatus;desc="DYNAMIC" Server-Timing: cfEdge;dur=3,cfOrigin;dur=236 Vary: Origin Vary: accept-encoding Via: 1.1 fly.io, 1.1 fly.io X-Content-Type-Options: nosniff X-Frame-Options: DENY X-Xss-Protection: 1; mode=block {"error":"invalid_grant","error_description":"client ID mismatch","error_uri":"https://datatracker.ietf.org/doc/html/rfc6749#section-5.2"}
Tests
- TestRefreshTokenIsBoundToTheClientItWasIssuedTo
./internal/protocols/oauth2
Pass
Implementation
Explainer
What this requires
The authorization server must check which client a refresh token belongs to every time the client's identity can be authenticated. For a confidential client that is every refresh request: the client authenticates, and the server compares the authenticated identity with the client the refresh token is bound to. A mismatch is refused.
The condition matters for public clients, which cannot be authenticated. The next sentence of Section 10.4 says what is owed there: "When client authentication is not possible, the authorization server SHOULD deploy other means to detect refresh token abuse." The RFC's example is rotation, which lets the server notice a stolen token when the old one is presented again.
Why it exists
Authentication alone answers who is calling. The binding check answers whether this caller may use this token. Without the second, client authentication protects nothing about refresh tokens: any client with valid credentials of its own could redeem a token issued to another, and the access tokens it received would carry a different application's grant.
What non-compliance looks like
A refresh handler with two independent checks, client credentials valid and refresh token valid, and no comparison between them. It looks complete in review because both checks are there. The only test that reveals it is one that crosses two clients.
For public clients, the failure is having no other means at all: non-rotating, long-lived refresh tokens for clients that cannot authenticate.
How ProtocolSoup tests it
At /oauth2/token the comparison is made against the authenticated client for a confidential client, and against the client_id in the request for a public one. A mismatch is 400 with error invalid_grant and error_description client ID mismatch, and the token is left intact for its owner. As other means, this server rotates the refresh token on every use, and binds a public client's refresh token to its DPoP key when the client presents a proof.
TestRefreshTokenIsBoundToTheClientItWasIssuedTo presents one confidential client's refresh token as a second confidential client that authenticates correctly with its own secret. It also presents it as a public client. Both are refused. The first client then redeems it.
The captured passing exchange is client-refreshes-its-own-token. The failing one, refresh-token-issued-to-another-client, is demo-app, authenticated with its real client password, presenting a refresh token issued to public-app.