Properly forward errors when log in is cancelled with client secret
This commit is contained in:
parent
ce6cb0503c
commit
5cc498dc62
|
@ -34,7 +34,8 @@ func handleLogin(msg messages.IPCMessage, cfg *config.Config, vault *vault.Vault
|
||||||
var masterKey crypto.MasterKey
|
var masterKey crypto.MasterKey
|
||||||
var masterpasswordHash string
|
var masterpasswordHash string
|
||||||
|
|
||||||
if secret, err := cfg.GetClientSecret(); err == nil && secret != "" {
|
var secret string // don't shadow err in the next line
|
||||||
|
if secret, err = cfg.GetClientSecret(); err == nil && secret != "" {
|
||||||
actionsLog.Info("Logging in with client secret")
|
actionsLog.Info("Logging in with client secret")
|
||||||
token, masterKey, masterpasswordHash, err = bitwarden.LoginWithApiKey(ctx, req.Email, cfg, vault)
|
token, masterKey, masterpasswordHash, err = bitwarden.LoginWithApiKey(ctx, req.Email, cfg, vault)
|
||||||
} else if req.Passwordless {
|
} else if req.Passwordless {
|
||||||
|
|
Loading…
Reference in New Issue