summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/remote.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/remote.go b/client/remote.go
index 4f3248a..34a0684 100644
--- a/client/remote.go
+++ b/client/remote.go
@@ -52,6 +52,12 @@ func (r *Remote) Handshake() error {
// Secret authenticates and sets secret.
func (r *Remote) Secret(secret string) (api.UserPayload, bool) {
+ // Clear secret if empty
+ if secret == "" {
+ r.secret = secret
+ return api.UserPayload{}, true
+ }
+
prev := r.secret
r.secret = secret
if user, err := r.This(); err != nil {