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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user