Skip to content
This repository has been archived by the owner on Feb 25, 2019. It is now read-only.

Commit

Permalink
Merge ba98ce9 into 325f639
Browse files Browse the repository at this point in the history
  • Loading branch information
camfou committed Jun 7, 2018
2 parents 325f639 + ba98ce9 commit 17ab93c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions protocols/OAuth2.js
Expand Up @@ -127,7 +127,7 @@ function authorizationRequest (req, options) {
var config = this.client
var url = URL.parse(endpoints.authorize.url)
var responseType = 'code'
var clientId = config.clientId
var clientId = config.client_id
var redirectUri = provider.redirect_uri
var state = options.state

Expand Down Expand Up @@ -177,7 +177,7 @@ function authorizationCodeGrant (code, done) {
// required token parameters
params.grant_type = 'authorization_code'
params.code = code
params.redirectUri = provider.redirect_uri
params.redirect_uri = provider.redirect_uri

// start building the request
var req = request[method || 'post'](url)
Expand Down
4 changes: 2 additions & 2 deletions test/unit/strategies/OAuth2.coffee
Expand Up @@ -50,7 +50,7 @@ describe 'OAuth2 Strategy', ->
name: 'name'

config =
clientId: 'id',
client_id: 'id',
client_secret: 'secret'
scope: ['c']

Expand Down Expand Up @@ -216,7 +216,7 @@ describe 'OAuth2 Strategy', ->

it 'should include client_id', ->
strategy.redirect.should.have.been.calledWith sinon.match(
'client_id=' + config.clientId
'client_id=' + config.client_id
)
it 'should include redirect_uri', ->
strategy.redirect.should.have.been.calledWith sinon.match(
Expand Down

0 comments on commit 17ab93c

Please sign in to comment.