auth: Run removeInvalidTokens 5s after startup

This should prevent problem with the AuthToken purge on Sundays, as the service is either running on sunday or will be restarted there after.

Also move base64url comment to right function

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-01-25 18:16:08 +01:00
parent c2d759da53
commit 99d6b39e00

View file

@ -85,7 +85,7 @@ export class AuthService {
// This is a very high ceiling unlikely to hinder legitimate usage, // This is a very high ceiling unlikely to hinder legitimate usage,
// but should prevent possible attack vectors // but should prevent possible attack vectors
throw new TooManyTokensError( throw new TooManyTokensError(
`User '${user.displayName}' has already 200 tokens and can't have anymore`, `User '${user.userName}' has already 200 tokens and can't have anymore`,
); );
} }
const secret = await this.randomString(64); const secret = await this.randomString(64);