Skip to content

Commit

Permalink
Merge pull request #6684 from RocketChat/allow-question-mark-on-oauth…
Browse files Browse the repository at this point in the history
…-token-path

[FIX] Allow question on OAuth token path
  • Loading branch information
engelgabriel authored Apr 13, 2017
2 parents 1973c98 + 333346a commit 5b2ad03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/rocketchat-custom-oauth/custom_oauth_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ export class CustomOAuth {
const credentialToken = Random.secret();
const loginStyle = OAuth._loginStyle(this.name, config, options);

const separator = this.authorizePath.indexOf('?') !== -1 ? '&' : '?';

const loginUrl = `${ this.authorizePath
}?client_id=${ config.clientId
}${ separator }client_id=${ config.clientId
}&redirect_uri=${ OAuth._redirectUri(this.name, config)
}&response_type=code` +
`&state=${ OAuth._stateParam(loginStyle, credentialToken, options.redirectUrl)
Expand Down

0 comments on commit 5b2ad03

Please sign in to comment.