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 committed by David Mehren
parent af993407b3
commit 6686fa58c5
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -85,7 +85,7 @@ export class AuthService {
// This is a very high ceiling unlikely to hinder legitimate usage,
// but should prevent possible attack vectors
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);