|
|
@ -6,7 +6,6 @@ package controlclient
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"bufio"
|
|
|
|
"bufio"
|
|
|
|
"bytes"
|
|
|
|
"bytes"
|
|
|
|
"cmp"
|
|
|
|
|
|
|
|
"context"
|
|
|
|
"context"
|
|
|
|
"crypto/ed25519"
|
|
|
|
"crypto/ed25519"
|
|
|
|
"encoding/base64"
|
|
|
|
"encoding/base64"
|
|
|
@ -587,11 +586,9 @@ func (c *Direct) doLogin(ctx context.Context, opt loginOpt) (mustRegen bool, new
|
|
|
|
c.logf("RegisterReq: onode=%v node=%v fup=%v nks=%v",
|
|
|
|
c.logf("RegisterReq: onode=%v node=%v fup=%v nks=%v",
|
|
|
|
request.OldNodeKey.ShortString(),
|
|
|
|
request.OldNodeKey.ShortString(),
|
|
|
|
request.NodeKey.ShortString(), opt.URL != "", len(nodeKeySignature) > 0)
|
|
|
|
request.NodeKey.ShortString(), opt.URL != "", len(nodeKeySignature) > 0)
|
|
|
|
if opt.Token != nil || cmp.Or(persist.Provider, persist.UserProfile.LoginName, authKey) != "" {
|
|
|
|
if opt.Token != nil || authKey != "" {
|
|
|
|
request.Auth = &tailcfg.RegisterResponseAuth{
|
|
|
|
request.Auth = &tailcfg.RegisterResponseAuth{
|
|
|
|
Oauth2Token: opt.Token,
|
|
|
|
Oauth2Token: opt.Token,
|
|
|
|
Provider: persist.Provider,
|
|
|
|
|
|
|
|
LoginName: persist.UserProfile.LoginName,
|
|
|
|
|
|
|
|
AuthKey: authKey,
|
|
|
|
AuthKey: authKey,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|