From 77adc83f9c5c4a925155aebb9ad14968afd54e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Poullain?= Date: Sun, 25 Aug 2024 11:04:46 +0200 Subject: [PATCH 1/2] [Docs] Fix typo --- docs/docs/common/utilities.md | 2 +- packages/core/src/common/tokens/generate-token.util.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/common/utilities.md b/docs/docs/common/utilities.md index 920a507dbf..d681284e21 100644 --- a/docs/docs/common/utilities.md +++ b/docs/docs/common/utilities.md @@ -8,7 +8,7 @@ In many situations, we need to generate tokens and then verify them. If your tok ### Unsigned Tokens -The `generateToken` function generates a cryptographically secure random token encoded in base64url (128 bits). +The `generateToken` function generates a cryptographically secure random token encoded in base64url (256 bits). ```typescript import { generateToken } from '@foal/core'; diff --git a/packages/core/src/common/tokens/generate-token.util.spec.ts b/packages/core/src/common/tokens/generate-token.util.spec.ts index b3ed5e4510..91f2444797 100644 --- a/packages/core/src/common/tokens/generate-token.util.spec.ts +++ b/packages/core/src/common/tokens/generate-token.util.spec.ts @@ -6,7 +6,7 @@ import { generateToken } from './generate-token.util'; describe('generateToken', () => { - it('should generate a random base64url-encoded string which size is 128 bits.', async () => { + it('should generate a random base64url-encoded string which size is 256 bits.', async () => { const token = await generateToken(); const buffer = Buffer.from(token, 'base64'); From b5d2399b324f70ba592abd90a8558f0d9da4933b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Poullain?= Date: Mon, 26 Aug 2024 15:09:46 +0200 Subject: [PATCH 2/2] [Docs] Fix typo --- docs/docs/authentication/user-class.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/docs/authentication/user-class.md b/docs/docs/authentication/user-class.md index dbd26ba681..78c39d621c 100644 --- a/docs/docs/authentication/user-class.md +++ b/docs/docs/authentication/user-class.md @@ -37,8 +37,7 @@ import { User } from './src/app/entities'; async function main() { const user = new User(); user.foo = 1; - await user.save(); 1 - }); + await user.save(); } ```