Skip to content

Commit 91376ae

Browse files
committed
fix(auth): Interactive auth prompt for audience and scopes for oauth interactive.
Signed-off-by: spbsoluble <[email protected]>
1 parent 020c30b commit 91376ae

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

cmd/login.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,19 @@ func authInteractive(
460460
serverConf.OAuthTokenUrl,
461461
)
462462
}
463+
if len(serverConf.Scopes) == 0 || forcePrompt {
464+
scopesCsv := promptForInteractiveParameter(
465+
"OAuth Scopes",
466+
strings.Join(serverConf.Scopes, ","),
467+
)
468+
serverConf.Scopes = strings.Split(scopesCsv, ",")
469+
}
470+
if serverConf.Audience == "" || forcePrompt {
471+
serverConf.Audience = promptForInteractiveParameter(
472+
"OAuth Audience",
473+
serverConf.Audience,
474+
)
475+
}
463476
}
464477

465478
if serverConf.APIPath == "" || forcePrompt {

0 commit comments

Comments
 (0)