Use rfc6749 to standardize authorization code feature#107
Open
jmcartlamy wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, OAuth 2.0 Authorization Code flow is an experimental feature and doesn't use the good way to process the authorization code response.
Indeed, append a header
Authorizationwith an encoding in base64client_id+client_secretdoesn't work if the server which hosts the token endpoint follow the standards.So, this commit follow the rfc6749 and standardize authorization code feature.
Moreover,
client_secretis not required during the access token request. However, if the token endpoint ask it, the dev' just add it in the configuration and it will be automatically add in the parameters.Edit: To resolve async issue on
callbackfunction (See issue #103), we return aPromiseinstead ofundefined. Documentation has been improved in this way.Edit 2: Sometimes, an user can keep
codeandstatein the url parameters. JSO throw an error but in most of cases, tokens & authorization are ok. Now, we just log a line said it could not find retrieve state object.