添加管理员登陆,添加nginx反向代理配置,
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user