diff --git a/panel/src/app/service/user_sso_service.ts b/panel/src/app/service/user_sso_service.ts index cab9a398..c60e01e3 100644 --- a/panel/src/app/service/user_sso_service.ts +++ b/panel/src/app/service/user_sso_service.ts @@ -9,6 +9,9 @@ export default class UserSSOService { if (!username || typeof username !== "string") throw new Error("username is required!"); const token = v4(); UserSSOService.tokens.set(token, username); + if (UserSSOService.tokens.size > 1000) { + UserSSOService.tokens.delete(UserSSOService.tokens.keys().next().value); + } return token; }