diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index 3d5751e89..9500cef57 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -70,9 +70,9 @@ export class AuthService { // base64url is quite easy buildable from base64 return text .toString('base64') - .replace('+', '-') - .replace('/', '_') - .replace(/=+$/, ''); + .replaceAll(/\+/g, '-') + .replaceAll(/\//g, '_') + .replaceAll(/=+$/g, ''); } async createTokenForUser( diff --git a/tsconfig.json b/tsconfig.json index bf10a2398..e129127e1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,7 @@ "sourceMap": true, "outDir": "./dist", "baseUrl": "./", - "incremental": true + "incremental": true, + "lib": ["esnext"] } }