-
Notifications
You must be signed in to change notification settings - Fork 594
Closed
Description
Currently the server requires that the client sends back its id and secret to the server when exchanging an authorization code for an access token:
- https://github.com/go-oauth2/oauth2/blob/master/server/server.go#L280
- https://github.com/go-oauth2/oauth2/blob/master/server/handler.go#L49
But the OAuth2 RFC does not require this: https://tools.ietf.org/html/rfc6749#section-4.1.3 i.e. the code itself should be enough to uniquely identify the client (passing the client_id parameter is allowed, though optional).
This means that currently this server implementation does not correctly work with the standard Go oauth2 library, and I guess many others.
I think a fix could be to maintain a map from authorization codes to clients, and use it to look up the client instead of expecting id and secret to be provided in the request.
Metadata
Metadata
Assignees
Labels
No labels