Skip to content

Commit

Permalink
Only successful login if persistence of tokens was succesful
Browse files Browse the repository at this point in the history
  • Loading branch information
Eirik Nygaard committed Nov 26, 2024
1 parent 94b973b commit c7f4b77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/go/internal/cli/cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ This command runs a browser-based authentication flow for the Vespa Cloud contro
return fmt.Errorf("login error: %w", err)
}

cli.printSuccess("Logged in")

// store the refresh token
secretsStore := &auth.Keyring{}
err = secretsStore.Set(auth.SecretsNamespace, system.Name, res.RefreshToken)
Expand All @@ -93,7 +91,9 @@ This command runs a browser-based authentication flow for the Vespa Cloud contro
if err := a.WriteCredentials(creds); err != nil {
return fmt.Errorf("failed to write credentials: %w", err)
}
return err

cli.printSuccess("Logged in")
return nil
},
}
}

0 comments on commit c7f4b77

Please sign in to comment.