添加管理员登陆,添加nginx反向代理配置,

This commit is contained in:
2025-07-27 20:01:36 +08:00
parent 9a366d042a
commit 33363aba78
17 changed files with 2010 additions and 836 deletions
+8 -1
View File
@@ -200,9 +200,16 @@ export class OAuthClient {
* @returns 状态值字符串
*/
generateState(): string {
// 获取当前端口号,优先级:API_PORT_CONFIG > PORT > 默认值
const currentPort = process.env.API_PORT_CONFIG || process.env.PORT;
const randomStr = Math.random().toString(36).substring(2, 15) +
Math.random().toString(36).substring(2, 15);
return `${randomStr}_idp`;
const stateValue = `login${currentPort}_${randomStr}_idp`;
console.log(`生成状态值: ${stateValue} (端口: ${currentPort})`);
return stateValue;
}
}