You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 01cbe77
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -371,6 +379,7 @@ export async function runConsoleLogin(
371
379
): Promise<void>{
372
380
conststate=randomBytes(16).toString("hex");
373
381
letcallbackError: unknown;
382
+
letsavedSessionWithoutApiKey=false;
374
383
constserver=http.createServer(async(req,res)=>{
375
384
try{
376
385
if(req.method==="OPTIONS"){
@@ -423,6 +432,7 @@ export async function runConsoleLogin(
423
432
...callbackPatch,
424
433
base_url: baseUrl||undefined,
425
434
});
435
+
savedSessionWithoutApiKey=true;
426
436
process.stderr.write(`Config saved to ${deps.authStore.path}\n`);
427
437
}
428
438
}catch(err: unknown){
@@ -506,4 +516,14 @@ export async function runConsoleLogin(
506
516
if(callbackError){
507
517
throwcallbackError;
508
518
}
519
+
520
+
if(opts?.needApiKey&&savedSessionWithoutApiKey){
521
+
constbinName=deps.identity.binName;
522
+
process.stderr.write(
523
+
`${localizeLogin(deps,{
524
+
"en-US": `Saved the console session only. Model commands still need an API key: ${binName} auth login --console, or ${binName} auth login --api-key <key>`,
"en-US": `No model API key is configured. Model commands need: ${identity.binName} auth login --console, or ${identity.binName} auth login --api-key <key>`,
0 commit comments