Skip to content

Commit

Permalink
Merge pull request #13 from ananay/revert-12-revert-11-patch-2
Browse files Browse the repository at this point in the history
Revert "Revert "Allow setting of the state parameter""
  • Loading branch information
ananay authored Jun 10, 2020
2 parents d6f96e3 + cbb480c commit e48cfc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ Strategy.prototype.authenticate = function (req, options) {
* @access protected
*/
Strategy.prototype.authorizationParams = function (options) {
options.state = crypto.randomBytes(5).toString('hex');
options.state = options.state || crypto.randomBytes(5).toString('hex');
options.response_type = "code id_token";
options.scope = "name email";
options.response_mode = "form_post";
return options;
}

module.exports = Strategy;
module.exports = Strategy;

0 comments on commit e48cfc8

Please sign in to comment.