m1k1o/neko · error
new user is created on first login in noauth mode
Error message
new user is created on first login in noauth mode
What it means
In noauth mode there is a single anonymous profile auto-created on first connection; there is no user store. Insert() is unsupported by design and always returns this error, because no new users can exist in noauth mode.
Source
Thrown at server/internal/member/noauth/provider.go:54
return nil
}
func (provider *MemberProviderCtx) Authenticate(username string, password string) (string, types.MemberProfile, error) {
// generate random token
token, err := utils.NewUID(5)
if err != nil {
return "", types.MemberProfile{}, err
}
// id is username with token
id := fmt.Sprintf("%s-%s", username, token)
provider.profile.Name = username
return id, provider.profile, nil
}
func (provider *MemberProviderCtx) Insert(username string, password string, profile types.MemberProfile) (string, error) {
return "", errors.New("new user is created on first login in noauth mode")
}
func (provider *MemberProviderCtx) UpdateProfile(id string, profile types.MemberProfile) error {
return nil
}
func (provider *MemberProviderCtx) UpdatePassword(id string, password string) error {
return errors.New("noauth mode does not have password")
}
func (provider *MemberProviderCtx) Select(id string) (types.MemberProfile, error) {
return types.MemberProfile{}, errors.New("cannot select user in noauth mode")
}
func (provider *MemberProviderCtx) SelectAll(limit int, offset int) (map[string]types.MemberProfile, error) {
return map[string]types.MemberProfile{}, nil
}
View on GitHub (pinned to b0f01cedea)
Solutions
- Do not create users in noauth mode; all clients share the single anonymous profile.
- Switch the deployment to multiuser or another dynamic member provider if multiple accounts are needed.
- Adjust client tooling to skip user-creation calls when the provider is noauth.
Example fix
// before
id, err := memberClient.Insert(username, password, profile)
// after
if memberProvider == "noauth" {
return errors.New("noauth mode has a single anonymous user; no creation needed")
}
id, err := memberClient.Insert(username, password, profile) Defensive patterns
Strategy: validation
Validate before calling
if memberProvider == "noauth" {
return errors.New("noauth mode has a single anonymous user; user creation not needed")
}
id, err := memberClient.Insert(username, password, profile) Type guard
func isNoauthUnsupportedErr(err error) bool {
return err != nil && strings.Contains(err.Error(), "in noauth mode")
} Try / catch
id, err := memberClient.Insert(username, password, profile)
if err != nil {
if isNoauthUnsupportedErr(err) {
log.Printf("noauth deployment: skip user creation: %v", err)
}
return err
} Prevention
- Skip all member CRUD calls when the provider is noauth.
- Treat noauth deployments as single-user/anonymous by design.
- Switch to multiuser or a dynamic provider when multiple accounts are needed.
- Conditionally render user-management UI based on the reported provider.
When it happens
Trigger: Any call to the member Insert API (create-user endpoint) while the server runs with member provider 'noauth'.
Common situations: Generic admin tooling that creates users against any neko deployment hits a noauth (single anonymous user) deployment; every create call fails because only the implicit anonymous user exists.
Related errors
- noauth mode does not have password
- cannot select user in noauth mode
- cannot delete user in noauth mode
- new user is created on first login in multiuser mode
- password can only be modified in config while in multiuser m
AI-assisted analysis of m1k1o/neko@b0f01cedea (2026-09-01).
Data as JSON: /api/errors/dd99e809e63d0ed4.
Report an issue: GitHub.