diff --git a/CHANGELOG.md b/CHANGELOG.md index d73926ca..32e5cfd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## HEAD + +### Enhancements + +- The OAuth2 unit now supports state tokens. Thanks @quangola! + ## 3.3.1 (2018-07-14) ### Fixes diff --git a/lib/cli/auth-oauth2/index.js b/lib/cli/auth-oauth2/index.js index f5a21b83..014798f8 100644 --- a/lib/cli/auth-oauth2/index.js +++ b/lib/cli/auth-oauth2/index.js @@ -54,6 +54,11 @@ module.exports.builder = function(yargs) { , default: process.env.OAUTH_SCOPE , demand: true }) + .option('oauth-state', { + describe: 'Whether to enable OAuth 2.0 state token support.' + , type: 'boolean' + , default: true + }) .option('oauth-domain', { describe: 'Optional email domain to allow authentication for.' , type: 'string' @@ -104,6 +109,7 @@ module.exports.handler = function(argv) { , clientSecret: argv.oauthClientSecret , callbackURL: argv.oauthCallbackUrl , scope: argv.oauthScope.split(/\s+/) + , state: argv.oauthState } }) }