Skip to content

Commit a0150a9

Browse files
committed
fix: use API key auth in server only
Signed-off-by: Xie Zhihao <[email protected]>
1 parent 9b1a604 commit a0150a9

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

veadk/cli/cli_init.py

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,28 @@ def _render_prompts() -> dict[str, Any]:
6363
)
6464
use_adk_web = deploy_mode == "2"
6565

66-
auth_method_options = {
67-
"1": "None",
68-
"2": "API key",
69-
"3": "OAuth2",
70-
}
71-
auth_methods = {
72-
"1": "none",
73-
"2": "api-key",
74-
"3": "oauth2",
75-
}
66+
auth_method_options = {}
67+
auth_methods = {}
68+
if use_adk_web:
69+
auth_method_options = {
70+
"1": "None",
71+
"2": "OAuth2",
72+
}
73+
auth_methods = {
74+
"1": "none",
75+
"2": "oauth2",
76+
}
77+
else:
78+
auth_method_options = {
79+
"1": "None",
80+
"2": "API key",
81+
"3": "OAuth2",
82+
}
83+
auth_methods = {
84+
"1": "none",
85+
"2": "api-key",
86+
"3": "oauth2",
87+
}
7688

7789
click.echo("Choose an authentication method:")
7890
for key, value in auth_method_options.items():

0 commit comments

Comments
 (0)