chore: pure-random 32-char secret, no default source, legacy migration

- genSecret: drop SeaReport- prefix, plain 32-char random hex
- users.source: no default anywhere (register/admin/external), ADD COLUMN
  migration now VARCHAR DEFAULT '' (was ENUM netease default)
- legacy upgrade path kept: ENUM->VARCHAR MODIFY + user_identities MODIFY
  + sources seeded netease/skin idempotently
- docs updated (credential format, no prefix)
This commit is contained in:
2026-08-19 20:16:16 +08:00
parent 65edbaf157
commit 3441eb9478
4 changed files with 7 additions and 7 deletions

View File

@@ -24,8 +24,8 @@ function genClientId() {
}
function genSecret() {
// SeaReport- + 32 位随机字符串
return 'SeaReport-' + crypto.randomBytes(16).toString('hex'); // 16 bytes = 32 hex chars
// 32 位随机字符串(hex = 32 chars)
return crypto.randomBytes(16).toString('hex');
}
async function createSession(clientId) {