mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-20 19:09:07 +01:00
Login with OIDC after having been logged out (#1719)
This commit is contained in:
parent
4ea12f472a
commit
cbf57e27a7
@ -199,6 +199,19 @@ func (h *Headscale) handleRegister(
|
||||
return
|
||||
}
|
||||
|
||||
// When logged out and reauthenticating with OIDC, the OldNodeKey is not passed, but the NodeKey has changed
|
||||
if node.NodeKey.String() != registerRequest.NodeKey.String() &&
|
||||
registerRequest.OldNodeKey.IsZero() && !node.IsExpired() {
|
||||
h.handleNodeKeyRefresh(
|
||||
writer,
|
||||
registerRequest,
|
||||
*node,
|
||||
machineKey,
|
||||
)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if registerRequest.Followup != "" {
|
||||
select {
|
||||
case <-req.Context().Done():
|
||||
|
Loading…
Reference in New Issue
Block a user