Skip to content

Commit

Permalink
Only add scope if it has a value
Browse files Browse the repository at this point in the history
  • Loading branch information
eliangcs committed Oct 7, 2024
1 parent 2a1ee90 commit 09cbc1e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cli/src/oclif/commands/invoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 09cbc1e

Please sign in to comment.