@@ -223,7 +223,7 @@ func defaultAuthFunc(url, code string) {
223223 }
224224 urlType := color .New (color .FgCyan , color .Bold ).SprintFunc ()
225225 fmt .Println ("Browser link: " + urlType (url ) + "\n " )
226- fmt .Println ("Alternatively, get CLI Command (\" Login via CLI\" ): " , urlType (fmt .Sprintf ("%s/profile?login=cli" , config .ConsoleBaseURL )))
226+ fmt .Println ("Alternatively, get CLI Command (\" Login via CLI\" ): " , urlType (fmt .Sprintf ("%s/profile?login=cli" , config .GlobalConfig . GetConsoleURL () )))
227227 fmt .Print ("\n " )
228228 caretType := color .New (color .FgGreen , color .Bold ).SprintFunc ()
229229 enterType := color .New (color .FgGreen , color .Bold ).SprintFunc ()
@@ -245,7 +245,7 @@ func defaultAuthFunc(url, code string) {
245245func skipBrowserAuthFunc (url , _ string ) {
246246 urlType := color .New (color .FgCyan , color .Bold ).SprintFunc ()
247247 fmt .Println ("Please copy" , urlType (url ), "and paste it in your browser." )
248- fmt .Println ("Alternatively, get CLI Command (\" Login via CLI\" ): " , urlType (fmt .Sprintf ("%s/profile?login=cli" , config .ConsoleBaseURL )))
248+ fmt .Println ("Alternatively, get CLI Command (\" Login via CLI\" ): " , urlType (fmt .Sprintf ("%s/profile?login=cli" , config .GlobalConfig . GetConsoleURL () )))
249249 fmt .Println ("Waiting for login to complete in browser... Ctrl+C to use CLI command instead." )
250250}
251251
@@ -402,10 +402,10 @@ func StandardLogin(authProvider string, email string, tokens *entity.AuthTokens)
402402
403403 kasAuthenticator := NewKasAuthenticator (
404404 email ,
405- "https://api.ngc.nvidia.com" ,
405+ config . GlobalConfig . GetBrevAuthURL () ,
406406 "https://login.nvidia.com" ,
407407 shouldPromptEmail ,
408- "https://brev.nvidia.com" ,
408+ config . GlobalConfig . GetConsoleURL () ,
409409 )
410410
411411 // Create the auth0 authenticator as an alternative
@@ -446,9 +446,5 @@ func StandardLogin(authProvider string, email string, tokens *entity.AuthTokens)
446446 }
447447 }
448448
449- if authenticator .GetCredentialProvider () == CredentialProviderKAS {
450- config .ConsoleBaseURL = "https://brev.nvidia.com"
451- }
452-
453449 return authenticator
454450}
0 commit comments