Does the implicit grant issue a refresh token?
No refresh token issued by the implicit grantRFC 6749 §4.2.2MUST NOTRoles: authorization_server
Requirement as recorded in the ProtocolSoup registry
The authorization server MUST NOT issue a refresh token.
Read §4.2.2 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
Not captured: The response this requirement constrains is the authorization response, which answers the End-User's sign-in. A capture does not record the sign-in: how the resource owner authenticates is the authorization server's own business, not an OAuth 2.0 message.
Failing exchange
Not captured: The response this requirement constrains is the authorization response, which answers the End-User's sign-in. A capture does not record the sign-in: how the resource owner authenticates is the authorization server's own business, not an OAuth 2.0 message.
Run it live
Looking Glass runs the flow that sends the message this requirement governs, against the same server, and decodes each exchange as it happens.
Open the flow in Looking GlassTests
- TestImplicitGrantReturnsAccessTokenInFragment
./internal/protocols/oauth2
Pass
Implementation
Explainer
What this requires
No: the implicit grant does not issue a refresh token. An implicit grant response has access_token, token_type, optionally expires_in and scope, and state. It has no refresh_token, and the server must not create one for the grant by any other route.
When the access token expires, the client sends the user agent through the authorization endpoint again.
Why it exists
Two properties of the grant combine. The response travels in a URL fragment, through the browser, where it can be seen in history, by scripts on the page and by browser extensions. And the client is public: it has no credentials, so the server cannot authenticate it when a refresh token comes back.
A refresh token is long-lived and, for a public client, usable by anyone who holds it. Putting one in a URL would turn a leak of a short-lived access token into standing access. RFC 6749 states the limit in the first sentence of Section 4.2, where the grant "does not support the issuance of refresh tokens".
What non-compliance looks like
A server whose implicit path calls the same token-issuing function as the authorization code path and serializes everything it returns into the fragment. The redirect then contains refresh_token=, and the token is in the browser's history.
A less visible form creates and stores a refresh token for the grant without returning it. The token cannot be used, but the server now holds a credential nobody asked for.
How ProtocolSoup tests it
The implicit path here has its own issuing function, which creates an access token and nothing else. No refresh token is written to the Mock IdP's store. TestImplicitGrantReturnsAccessTokenInFragment signs in as a demo user through /oauth2/authorize with response_type=token and parses the fragment of the redirect. It expects a JWT access_token, token_type Bearer, expires_in 3600, the granted scope, the original state and iss, and it asserts there is no refresh_token and no code. A separate test confirms the token endpoint does not accept implicit as a grant type.
There is no captured exchange for this row, because the response it constrains answers the End-User's sign-in, which a capture does not record.