diff --git a/packages/cli/src/oclif/commands/invoke.js b/packages/cli/src/oclif/commands/invoke.js index 1706009e8..c6a019872 100644 --- a/packages/cli/src/oclif/commands/invoke.js +++ b/packages/cli/src/oclif/commands/invoke.js @@ -445,7 +445,9 @@ class InvokeCommand extends BaseCommand { }); if (!authorizeUrl.includes('&scope=')) { const scope = appDefinition.authentication.oauth2Config.scope; - authorizeUrl += `&scope=${encodeURIComponent(scope)}`; + if (scope) { + authorizeUrl += `&scope=${encodeURIComponent(scope)}`; + } } debug('authorizeUrl:', authorizeUrl);