mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-19 18:40:57 -07:00
fix(auth): prioritize GEMINI_API_KEY env var and skip unnecessary key… (#14745)
This commit is contained in:
@@ -582,6 +582,13 @@ Logging in with Google... Restarting Gemini CLI to continue.
|
||||
settings.merged.security?.auth?.selectedType &&
|
||||
!settings.merged.security?.auth?.useExternal
|
||||
) {
|
||||
// We skip validation for Gemini API key here because it might be stored
|
||||
// in the keychain, which we can't check synchronously.
|
||||
// The useAuth hook handles validation for this case.
|
||||
if (settings.merged.security.auth.selectedType === AuthType.USE_GEMINI) {
|
||||
return;
|
||||
}
|
||||
|
||||
const error = validateAuthMethod(
|
||||
settings.merged.security.auth.selectedType,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user