m1k1o/neko · info · ErrSessionLoginsLocked

session logins locked

Error message

session logins locked

What it means

ErrSessionLoginsLocked is a sentinel error in the neko types package returned by Login when the server-wide Settings.LockedLogins flag is enabled. All new logins are locked (an admin control), so authentication is refused regardless of valid credentials.

Source

Thrown at server/pkg/types/session.go:14

package types

import (
	"errors"
	"net/http"
	"time"
)

var (
	ErrSessionNotFound         = errors.New("session not found")
	ErrSessionAlreadyExists    = errors.New("session already exists")
	ErrSessionAlreadyConnected = errors.New("session is already connected")
	ErrSessionLoginDisabled    = errors.New("session login disabled")
	ErrSessionLoginsLocked     = errors.New("session logins locked")
)

type Cursor struct {
	X int `json:"x"`
	Y int `json:"y"`
}

type SessionProfile struct {
	Id      string
	Token   string
	Profile MemberProfile
}

type SessionState struct {
	IsConnected bool `json:"is_connected"`
	// when the session was last connected
	ConnectedSince *time.Time `json:"connected_since,omitempty"`
	// when the session was last not connected

View on GitHub (pinned to b0f01cedea)

Solutions

  1. Have an admin toggle LockedLogins=false via the control/settings API, then retry login.
  2. Wait until the room owner unlocks logins.
  3. If locked unintentionally, review who/what enabled the flag (admin API calls, plugins) and adjust.
  4. Update automation/runbooks to check Settings().LockedLogins before attempting login.
Defensive patterns

Strategy: fallback

Validate before calling

// check lock state before attempting login
if sessions.Settings().LockedLogins {
    return errors.New("logins are currently locked by an admin")
}

Try / catch

_, _, err := manager.Login(username, password)
if errors.Is(err, types.ErrSessionLoginsLocked) {
    // show 'room locked' UI and poll until unlocked
    return
}
return err

Prevention

When it happens

Trigger: Login called while sessions.Settings().LockedLogins is true — e.g. an admin locked the room to freeze current connections or during maintenance/incident response.

Common situations: Admins locking a shared remote-desktop room during a session and forgetting to unlock; scripted automation attempting logins against a locked room; after a security incident where logins were locked intentionally.

Related errors


AI-assisted analysis of m1k1o/neko@b0f01cedea (2026-09-01). Data as JSON: /api/errors/242261271ee319b1. Report an issue: GitHub.