Updates to support AzureAD login. #8
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.
The profile request for AzureAD requires an Auth Bearer header rather than an access_token in the URL. Since adding an extra header shouldn't ever hurt anything, updated the get call for the profile to include the access_token value in an Auth Bearer header in addition to including it on the URL.
I also updated the logic for the passing of parameters for the signin URL so that you can pass an arbitrary number of parameters over to meet the needs of any given provider. I thought this was a little more robust than just adding the "Resource" parameter by itself.
I also found the ability to add any parameter I wished to be very useful when trouble-shooting to try and figure out why my login was not behaving the same as Passport, since this would allow me to add/remove parameters from the original call.