koishijs / koishijs/webui

Bug: `auth`在`mysql`下多次创建admin用户

Open
#296 4 comments 0 reactions 0 assignees View on GitHub
bug plugin: auth
Dominant language
Vue
Stars
40
Forks
22
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

`auth` 会upsert一个id=0的user admin
而mysql默认的auto_increment为1
导致在mysql环境下每次启动都会多一行admin

### Steps to reproduce

/

### Expected behavior

/

### Screenshots

_No response_

### Versions

- OS:
- Platform:
- Node version:
- Koishi version:

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the auth code that upserts the id=0 admin user and trace how that record is persisted under MySQL. Reproduce the issue by restarting in a MySQL environment, then verify that startup no longer creates an additional admin row.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql
Domain
authentication, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.