diff --git a/docs/blog/2022-05-29-version-2.9-release-notes.md b/docs/blog/2022-05-29-version-2.9-release-notes.md new file mode 100644 index 0000000000..17b6ea9e1d --- /dev/null +++ b/docs/blog/2022-05-29-version-2.9-release-notes.md @@ -0,0 +1,62 @@ +--- +title: Version 2.9 release notes +author: LoĂŻc Poullain +author_title: Fullstack developer and creator of FoalTS +author_url: https://github.com/LoicPoullain +author_image_url: https://avatars1.githubusercontent.com/u/13604533?v=4 +image: blog/twitter-banners/version-2.9-release-notes.png +tags: [release] +--- + +![Banner](./assets/version-2.9-is-here/banner.png) + +Version 2.9 of [Foal](https://foalts.org/) has been released! Here are the improvements that it brings. + + + +## New OAuth2 Twitter Provider + +After LinkedIn, Google, Github and Facebook, Foal now supports Twitter for social authentication. + +👉 [Link to the documentation](https://foalts.org/docs/authentication-and-access-control/social-auth/) + +A big thanks to [@LeonardoSalvucci](https://github.com/LeonardoSalvucci) for having implemented this feature. + +```typescript +// 3p +import { Context, dependency, Get } from '@foal/core'; +import { TwitterProvider } from '@foal/social'; + +export class AuthController { + @dependency + twitter: TwitterProvider; + + @Get('/signin/twitter') + redirectToTwitter() { + // Your "Login In with Twitter" button should point to this route. + // The user will be redirected to Twitter auth page. + return this.twitter.redirect(); + } + + @Get('/signin/twitter/callback') + async handleTwitterRedirection(ctx: Context) { + // Once the user gives their permission to log in with Twitter, the OAuth server + // will redirect the user to this route. This route must match the redirect URI. + const { userInfo, tokens } = await this.twitter.getUserInfo(ctx); + + // Do something with the user information AND/OR the access token. + // If you only need the access token, you can call the "getTokens" method. + + // The method usually ends with a HttpResponseRedirect object as returned value. + } + +} +``` + +## OAuth2 Providers support PKCE Code Flow + +OAuth2 abstract provider now supports PKCE code flow. If you wish to implement your own provider using PKCE, it's now possible! + +## Support for version 15 of `graphql` and latest version of `type-graphql` + +Foal's dependencies have been updated so as to support the latest version of [TypeGraphQL](https://typegraphql.com/). \ No newline at end of file diff --git a/docs/blog/assets/version-2.9-is-here/banner.png b/docs/blog/assets/version-2.9-is-here/banner.png new file mode 100644 index 0000000000..164987b828 Binary files /dev/null and b/docs/blog/assets/version-2.9-is-here/banner.png differ diff --git a/docs/blog/assets/version-2.9-is-here/twitter.png b/docs/blog/assets/version-2.9-is-here/twitter.png new file mode 100644 index 0000000000..764c2ccde6 Binary files /dev/null and b/docs/blog/assets/version-2.9-is-here/twitter.png differ diff --git a/docs/docs/authentication-and-access-control/social-auth.md b/docs/docs/authentication-and-access-control/social-auth.md index 40e2c9b074..c3345744bb 100644 --- a/docs/docs/authentication-and-access-control/social-auth.md +++ b/docs/docs/authentication-and-access-control/social-auth.md @@ -367,10 +367,14 @@ export class GithubProvider extends AbstractProvider *This feature is available from version 2.9 onwards.* + When requesting the token endpoint, the provider sends the client ID and secret as a query parameter by default. If you want to send them in an `Authorization` header using the *basic* scheme, you can do so by setting the `useAuthorizationHeaderForTokenEndpoint` property to `true`. ### Enabling Code Flow with PKCE +> *This feature is available from version 2.9 onwards.* + If you want to enable code flow with PKCE, you can do so by setting the `usePKCE` property to `true`. > By default, the provider will perform a SHA256 hash to generate the code challenge. If you wish to use the plaintext code verifier string as code challenge, you can do so by setting the `useCodeVerifierAsCodeChallenge` property to `true`. @@ -549,6 +553,8 @@ const { userInfo } = await this.linkedin.getUserInfo(ctx, { ### Twitter +> *This feature is available from version 2.9 onwards.* + |Service name| Default scopes | Available scopes | |---|---|---| | `TwitterProvider` | `users.read tweet.read` | [API documentation](https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me) | diff --git a/docs/i18n/es/docusaurus-plugin-content-docs/current.json b/docs/i18n/es/docusaurus-plugin-content-docs/current.json index 5ede5ca0b4..99a7b70226 100644 --- a/docs/i18n/es/docusaurus-plugin-content-docs/current.json +++ b/docs/i18n/es/docusaurus-plugin-content-docs/current.json @@ -1,6 +1,6 @@ { "version.label": { - "message": "2.8.2 (Ășltima)", + "message": "2.9.0 (Ășltima)", "description": "The label for version current" }, "sidebar.someSidebar.category.TUTORIALS": { diff --git a/docs/i18n/es/docusaurus-plugin-content-docs/current/api-section/graphql.md b/docs/i18n/es/docusaurus-plugin-content-docs/current/api-section/graphql.md index 3fa72f4973..1b8faa146b 100644 --- a/docs/i18n/es/docusaurus-plugin-content-docs/current/api-section/graphql.md +++ b/docs/i18n/es/docusaurus-plugin-content-docs/current/api-section/graphql.md @@ -29,6 +29,8 @@ title: GraphQL To use GraphQL with FoalTS, you need to install the packages `graphql` and `@foal/graphql`. The first one is maintained by the GraphQL community and parses and resolves queries. The second is specific to FoalTS and allows you to configure a controller compatible with common GraphQL clients ([graphql-request](https://www.npmjs.com/package/graphql-request), [Apollo Client](https://www.apollographql.com/docs/react/), etc), load type definitions from separate files or handle errors thrown in resolvers. ```bash +npm install graphql@15 @foal/graphql +# OR npm install graphql@14 @foal/graphql ``` @@ -419,6 +421,17 @@ export class ApiController extends GraphQLController { ## Using TypeGraphQL + +:::info + +TypeGraphQL requires version 15 of the `graphql` package: + +```bash +npm install graphql@15 +``` + +::: + > *[TypeGraphQL](https://typegraphql.com/) is a library that allows you to create GraphQL schemas and resolvers with TypeScript classes and decorators.* You can use TypeGraphQL by simply calling its `buildSchema` function. diff --git a/docs/i18n/es/docusaurus-plugin-content-docs/current/authentication-and-access-control/social-auth.md b/docs/i18n/es/docusaurus-plugin-content-docs/current/authentication-and-access-control/social-auth.md index 52480fac98..a389e1ddba 100644 --- a/docs/i18n/es/docusaurus-plugin-content-docs/current/authentication-and-access-control/social-auth.md +++ b/docs/i18n/es/docusaurus-plugin-content-docs/current/authentication-and-access-control/social-auth.md @@ -11,6 +11,7 @@ In addition to traditional password authentication, Foal provides services to au - Facebook - Github - Linkedin +- Twitter If your provider is not listed here but supports OAuth 2.0, then you can still [extend the `AbstractProvider`](#custom-provider) class to integrate it or use a [community provider](#community-providers) below. @@ -364,6 +365,73 @@ export class GithubProvider extends AbstractProvider *This feature is available from version 2.9 onwards.* + +When requesting the token endpoint, the provider sends the client ID and secret as a query parameter by default. If you want to send them in an `Authorization` header using the *basic* scheme, you can do so by setting the `useAuthorizationHeaderForTokenEndpoint` property to `true`. + +### Enabling Code Flow with PKCE + +> *This feature is available from version 2.9 onwards.* + +If you want to enable code flow with PKCE, you can do so by setting the `usePKCE` property to `true`. + +> By default, the provider will perform a SHA256 hash to generate the code challenge. If you wish to use the plaintext code verifier string as code challenge, you can do so by setting the `useCodeVerifierAsCodeChallenge` property to `true`. + +When using this feature, the provider encrypts the code verifier and stores it in a cookie on the client. In order to do this, you need to provide a secret using the configuration key `settings.social.secret.codeVerifierSecret`. + + + + +```yaml +settings: + social: + secret: + codeVerifierSecret: 'xxx' +``` + + + + +```json +{ + "settings": { + "social": { + "secret": { + "codeVerifierSecret": "xxx" + } + } + } +} +``` + + + + +```javascript +module.exports = { + settings: { + social: { + secret: { + codeVerifierSecret: 'xxx' + } + } + } +} +``` + + + + + ## Official Providers ### Google @@ -483,6 +551,19 @@ const { userInfo } = await this.linkedin.getUserInfo(ctx, { | `fields` | `string[]` | List of fields that the returned user info object should contain. Additional documentation on [field projections](https://developer.linkedin.com/docs/guide/v2/concepts/projections). | | `projection` | `string` | LinkedIn projection parameter. | +### Twitter + +> *This feature is available from version 2.9 onwards.* + +|Service name| Default scopes | Available scopes | +|---|---|---| +| `TwitterProvider` | `users.read tweet.read` | [API documentation](https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me) | + +#### Register an OAuth application + +Visit [this page](https://developer.twitter.com/en/portal/dashboard) to create an application and obtain a client ID and a client secret. You must configure Oauth2 settings to be used with public client; + + ## Community Providers There are no community providers available yet! If you want to share one, feel free to [open a PR](https://github.com/FoalTS/foal) on Github. @@ -492,6 +573,7 @@ There are no community providers available yet! If you want to share one, feel f | Error | Description | | --- | --- | | `InvalidStateError` | The `state` query does not match the value found in the cookie. | +| `CodeVerifierNotFound` | The encrypted code verifier was not found in the cookie (only when using PKCE). | | `AuthorizationError` | The authorization server returns an error. This can happen when a user does not give consent on the provider page. | | `UserInfoError` | Thrown in `AbstractProvider.getUserFromTokens` if the request to the resource server is unsuccessful. | diff --git a/docs/i18n/es/docusaurus-plugin-content-docs/current/deployment-and-environments/checklist.md b/docs/i18n/es/docusaurus-plugin-content-docs/current/deployment-and-environments/checklist.md index 06cee7510f..1851ba8520 100644 --- a/docs/i18n/es/docusaurus-plugin-content-docs/current/deployment-and-environments/checklist.md +++ b/docs/i18n/es/docusaurus-plugin-content-docs/current/deployment-and-environments/checklist.md @@ -74,6 +74,8 @@ tsconfig.app.json Then you will need to run `npm install` and `npm run build`. +> If you get an error such as `Foal not found error`, it is probably because the dev dependencies (which include the `@foal/cli` package) have not been installed. To force the installation of these dependencies, you can use the following command: `npm install --production=false`. + If you install dependencies and build the app on your local host directly, then you should upload these files: ```sh @@ -84,4 +86,4 @@ ormconfig.js package-lock.json package.json public/ # this may depend on how the platform manages static files -``` \ No newline at end of file +``` diff --git a/docs/i18n/fr/docusaurus-plugin-content-docs/current.json b/docs/i18n/fr/docusaurus-plugin-content-docs/current.json index f1bd368739..2a49afddf6 100644 --- a/docs/i18n/fr/docusaurus-plugin-content-docs/current.json +++ b/docs/i18n/fr/docusaurus-plugin-content-docs/current.json @@ -1,6 +1,6 @@ { "version.label": { - "message": "2.8.2 (latest)", + "message": "2.9.0 (latest)", "description": "The label for version current" }, "sidebar.someSidebar.category.TUTORIALS": { diff --git a/docs/i18n/fr/docusaurus-plugin-content-docs/current/api-section/graphql.md b/docs/i18n/fr/docusaurus-plugin-content-docs/current/api-section/graphql.md index 3fa72f4973..1b8faa146b 100644 --- a/docs/i18n/fr/docusaurus-plugin-content-docs/current/api-section/graphql.md +++ b/docs/i18n/fr/docusaurus-plugin-content-docs/current/api-section/graphql.md @@ -29,6 +29,8 @@ title: GraphQL To use GraphQL with FoalTS, you need to install the packages `graphql` and `@foal/graphql`. The first one is maintained by the GraphQL community and parses and resolves queries. The second is specific to FoalTS and allows you to configure a controller compatible with common GraphQL clients ([graphql-request](https://www.npmjs.com/package/graphql-request), [Apollo Client](https://www.apollographql.com/docs/react/), etc), load type definitions from separate files or handle errors thrown in resolvers. ```bash +npm install graphql@15 @foal/graphql +# OR npm install graphql@14 @foal/graphql ``` @@ -419,6 +421,17 @@ export class ApiController extends GraphQLController { ## Using TypeGraphQL + +:::info + +TypeGraphQL requires version 15 of the `graphql` package: + +```bash +npm install graphql@15 +``` + +::: + > *[TypeGraphQL](https://typegraphql.com/) is a library that allows you to create GraphQL schemas and resolvers with TypeScript classes and decorators.* You can use TypeGraphQL by simply calling its `buildSchema` function. diff --git a/docs/i18n/fr/docusaurus-plugin-content-docs/current/authentication-and-access-control/groups-and-permissions.md b/docs/i18n/fr/docusaurus-plugin-content-docs/current/authentication-and-access-control/groups-and-permissions.md index 578ceb4169..900e967bef 100644 --- a/docs/i18n/fr/docusaurus-plugin-content-docs/current/authentication-and-access-control/groups-and-permissions.md +++ b/docs/i18n/fr/docusaurus-plugin-content-docs/current/authentication-and-access-control/groups-and-permissions.md @@ -69,7 +69,7 @@ export async function main(args: { codeName: string, name: string }) { try { console.log( - await permission.save(); + await permission.save() ); } catch (error: any) { console.log(error.message); @@ -388,4 +388,4 @@ The class `UserWithPermissions` provides a static method `withPerm` to get all u class User extends UserWithPermissions {} const users = await User.withPerm('perm1'); -``` \ No newline at end of file +``` diff --git a/docs/i18n/fr/docusaurus-plugin-content-docs/current/authentication-and-access-control/social-auth.md b/docs/i18n/fr/docusaurus-plugin-content-docs/current/authentication-and-access-control/social-auth.md index 428dc5f40f..7648c84a51 100644 --- a/docs/i18n/fr/docusaurus-plugin-content-docs/current/authentication-and-access-control/social-auth.md +++ b/docs/i18n/fr/docusaurus-plugin-content-docs/current/authentication-and-access-control/social-auth.md @@ -12,6 +12,7 @@ In addition to traditional password authentication, Foal provides services to au - Facebook - Github - Linkedin +- Twitter If your provider is not listed here but supports OAuth 2.0, then you can still [extend the `AbstractProvider`](#custom-provider) class to integrate it or use a [community provider](#community-providers) below. @@ -365,6 +366,73 @@ export class GithubProvider extends AbstractProvider *This feature is available from version 2.9 onwards.* + +When requesting the token endpoint, the provider sends the client ID and secret as a query parameter by default. If you want to send them in an `Authorization` header using the *basic* scheme, you can do so by setting the `useAuthorizationHeaderForTokenEndpoint` property to `true`. + +### Enabling Code Flow with PKCE + +> *This feature is available from version 2.9 onwards.* + +If you want to enable code flow with PKCE, you can do so by setting the `usePKCE` property to `true`. + +> By default, the provider will perform a SHA256 hash to generate the code challenge. If you wish to use the plaintext code verifier string as code challenge, you can do so by setting the `useCodeVerifierAsCodeChallenge` property to `true`. + +When using this feature, the provider encrypts the code verifier and stores it in a cookie on the client. In order to do this, you need to provide a secret using the configuration key `settings.social.secret.codeVerifierSecret`. + + + + +```yaml +settings: + social: + secret: + codeVerifierSecret: 'xxx' +``` + + + + +```json +{ + "settings": { + "social": { + "secret": { + "codeVerifierSecret": "xxx" + } + } + } +} +``` + + + + +```javascript +module.exports = { + settings: { + social: { + secret: { + codeVerifierSecret: 'xxx' + } + } + } +} +``` + + + + + ## Official Providers ### Google @@ -484,6 +552,19 @@ const { userInfo } = await this.linkedin.getUserInfo(ctx, { | `fields` | `string[]` | List of fields that the returned user info object should contain. Additional documentation on [field projections](https://developer.linkedin.com/docs/guide/v2/concepts/projections). | | `projection` | `string` | LinkedIn projection parameter. | +### Twitter + +> *This feature is available from version 2.9 onwards.* + +|Service name| Default scopes | Available scopes | +|---|---|---| +| `TwitterProvider` | `users.read tweet.read` | [API documentation](https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me) | + +#### Register an OAuth application + +Visit [this page](https://developer.twitter.com/en/portal/dashboard) to create an application and obtain a client ID and a client secret. You must configure Oauth2 settings to be used with public client; + + ## Community Providers There are no community providers available yet! If you want to share one, feel free to [open a PR](https://github.com/FoalTS/foal) on Github. @@ -493,6 +574,7 @@ There are no community providers available yet! If you want to share one, feel f | Error | Description | | --- | --- | | `InvalidStateError` | The `state` query does not match the value found in the cookie. | +| `CodeVerifierNotFound` | The encrypted code verifier was not found in the cookie (only when using PKCE). | | `AuthorizationError` | The authorization server returns an error. This can happen when a user does not give consent on the provider page. | | `UserInfoError` | Thrown in `AbstractProvider.getUserFromTokens` if the request to the resource server is unsuccessful. | diff --git a/docs/i18n/fr/docusaurus-plugin-content-docs/current/deployment-and-environments/checklist.md b/docs/i18n/fr/docusaurus-plugin-content-docs/current/deployment-and-environments/checklist.md index 1455030872..fa5361aa02 100644 --- a/docs/i18n/fr/docusaurus-plugin-content-docs/current/deployment-and-environments/checklist.md +++ b/docs/i18n/fr/docusaurus-plugin-content-docs/current/deployment-and-environments/checklist.md @@ -74,6 +74,8 @@ tsconfig.app.json Then you will need to run `npm install` and `npm run build`. +> If you get an error such as `Foal not found error`, it is probably because the dev dependencies (which include the `@foal/cli` package) have not been installed. To force the installation of these dependencies, you can use the following command: `npm install --production=false`. + If you install dependencies and build the app on your local host directly, then you should upload these files: ```sh @@ -84,4 +86,4 @@ ormconfig.js package-lock.json package.json public/ # this may depend on how the platform manages static files -``` \ No newline at end of file +``` diff --git a/docs/i18n/id/docusaurus-plugin-content-docs/current.json b/docs/i18n/id/docusaurus-plugin-content-docs/current.json index b7272c8e9a..ad2466a74a 100644 --- a/docs/i18n/id/docusaurus-plugin-content-docs/current.json +++ b/docs/i18n/id/docusaurus-plugin-content-docs/current.json @@ -1,6 +1,6 @@ { "version.label": { - "message": "2.8.2 (terbaru)", + "message": "2.9.0 (terbaru)", "description": "The label for version current" }, "sidebar.someSidebar.category.TUTORIALS": { diff --git a/docs/i18n/id/docusaurus-plugin-content-docs/current/api-section/graphql.md b/docs/i18n/id/docusaurus-plugin-content-docs/current/api-section/graphql.md index 3fa72f4973..1b8faa146b 100644 --- a/docs/i18n/id/docusaurus-plugin-content-docs/current/api-section/graphql.md +++ b/docs/i18n/id/docusaurus-plugin-content-docs/current/api-section/graphql.md @@ -29,6 +29,8 @@ title: GraphQL To use GraphQL with FoalTS, you need to install the packages `graphql` and `@foal/graphql`. The first one is maintained by the GraphQL community and parses and resolves queries. The second is specific to FoalTS and allows you to configure a controller compatible with common GraphQL clients ([graphql-request](https://www.npmjs.com/package/graphql-request), [Apollo Client](https://www.apollographql.com/docs/react/), etc), load type definitions from separate files or handle errors thrown in resolvers. ```bash +npm install graphql@15 @foal/graphql +# OR npm install graphql@14 @foal/graphql ``` @@ -419,6 +421,17 @@ export class ApiController extends GraphQLController { ## Using TypeGraphQL + +:::info + +TypeGraphQL requires version 15 of the `graphql` package: + +```bash +npm install graphql@15 +``` + +::: + > *[TypeGraphQL](https://typegraphql.com/) is a library that allows you to create GraphQL schemas and resolvers with TypeScript classes and decorators.* You can use TypeGraphQL by simply calling its `buildSchema` function. diff --git a/docs/i18n/id/docusaurus-plugin-content-docs/current/authentication-and-access-control/groups-and-permissions.md b/docs/i18n/id/docusaurus-plugin-content-docs/current/authentication-and-access-control/groups-and-permissions.md index 13cc89404d..60dbb184b4 100644 --- a/docs/i18n/id/docusaurus-plugin-content-docs/current/authentication-and-access-control/groups-and-permissions.md +++ b/docs/i18n/id/docusaurus-plugin-content-docs/current/authentication-and-access-control/groups-and-permissions.md @@ -69,7 +69,7 @@ export async function main(args: { codeName: string, name: string }) { try { console.log( - await permission.save(); + await permission.save() ); } catch (error: any) { console.log(error.message); @@ -388,4 +388,4 @@ The class `UserWithPermissions` provides a static method `withPerm` to get all u class User extends UserWithPermissions {} const users = await User.withPerm('perm1'); -``` \ No newline at end of file +``` diff --git a/docs/i18n/id/docusaurus-plugin-content-docs/current/authentication-and-access-control/social-auth.md b/docs/i18n/id/docusaurus-plugin-content-docs/current/authentication-and-access-control/social-auth.md index 62c500a35b..6d01d0f4d2 100644 --- a/docs/i18n/id/docusaurus-plugin-content-docs/current/authentication-and-access-control/social-auth.md +++ b/docs/i18n/id/docusaurus-plugin-content-docs/current/authentication-and-access-control/social-auth.md @@ -12,6 +12,7 @@ In addition to traditional password authentication, Foal provides services to au - Facebook - Github - Linkedin +- Twitter If your provider is not listed here but supports OAuth 2.0, then you can still [extend the `AbstractProvider`](#custom-provider) class to integrate it or use a [community provider](#community-providers) below. @@ -365,6 +366,73 @@ export class GithubProvider extends AbstractProvider *This feature is available from version 2.9 onwards.* + +When requesting the token endpoint, the provider sends the client ID and secret as a query parameter by default. If you want to send them in an `Authorization` header using the *basic* scheme, you can do so by setting the `useAuthorizationHeaderForTokenEndpoint` property to `true`. + +### Enabling Code Flow with PKCE + +> *This feature is available from version 2.9 onwards.* + +If you want to enable code flow with PKCE, you can do so by setting the `usePKCE` property to `true`. + +> By default, the provider will perform a SHA256 hash to generate the code challenge. If you wish to use the plaintext code verifier string as code challenge, you can do so by setting the `useCodeVerifierAsCodeChallenge` property to `true`. + +When using this feature, the provider encrypts the code verifier and stores it in a cookie on the client. In order to do this, you need to provide a secret using the configuration key `settings.social.secret.codeVerifierSecret`. + + + + +```yaml +settings: + social: + secret: + codeVerifierSecret: 'xxx' +``` + + + + +```json +{ + "settings": { + "social": { + "secret": { + "codeVerifierSecret": "xxx" + } + } + } +} +``` + + + + +```javascript +module.exports = { + settings: { + social: { + secret: { + codeVerifierSecret: 'xxx' + } + } + } +} +``` + + + + + ## Official Providers ### Google @@ -484,6 +552,19 @@ const { userInfo } = await this.linkedin.getUserInfo(ctx, { | `fields` | `string[]` | List of fields that the returned user info object should contain. Additional documentation on [field projections](https://developer.linkedin.com/docs/guide/v2/concepts/projections). | | `projection` | `string` | LinkedIn projection parameter. | +### Twitter + +> *This feature is available from version 2.9 onwards.* + +|Service name| Default scopes | Available scopes | +|---|---|---| +| `TwitterProvider` | `users.read tweet.read` | [API documentation](https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me) | + +#### Register an OAuth application + +Visit [this page](https://developer.twitter.com/en/portal/dashboard) to create an application and obtain a client ID and a client secret. You must configure Oauth2 settings to be used with public client; + + ## Community Providers There are no community providers available yet! If you want to share one, feel free to [open a PR](https://github.com/FoalTS/foal) on Github. @@ -493,6 +574,7 @@ There are no community providers available yet! If you want to share one, feel f | Error | Description | | --- | --- | | `InvalidStateError` | The `state` query does not match the value found in the cookie. | +| `CodeVerifierNotFound` | The encrypted code verifier was not found in the cookie (only when using PKCE). | | `AuthorizationError` | The authorization server returns an error. This can happen when a user does not give consent on the provider page. | | `UserInfoError` | Thrown in `AbstractProvider.getUserFromTokens` if the request to the resource server is unsuccessful. | diff --git a/docs/i18n/id/docusaurus-plugin-content-docs/current/deployment-and-environments/checklist.md b/docs/i18n/id/docusaurus-plugin-content-docs/current/deployment-and-environments/checklist.md index 34b7efad9b..2e86cfa5fc 100644 --- a/docs/i18n/id/docusaurus-plugin-content-docs/current/deployment-and-environments/checklist.md +++ b/docs/i18n/id/docusaurus-plugin-content-docs/current/deployment-and-environments/checklist.md @@ -74,6 +74,8 @@ tsconfig.app.json Then you will need to run `npm install` and `npm run build`. +> If you get an error such as `Foal not found error`, it is probably because the dev dependencies (which include the `@foal/cli` package) have not been installed. To force the installation of these dependencies, you can use the following command: `npm install --production=false`. + If you install dependencies and build the app on your local host directly, then you should upload these files: ```sh @@ -84,4 +86,4 @@ ormconfig.js package-lock.json package.json public/ # this may depend on how the platform manages static files -``` \ No newline at end of file +``` diff --git a/docs/static/blog/twitter-banners/version-2.9-release-notes.png b/docs/static/blog/twitter-banners/version-2.9-release-notes.png new file mode 100644 index 0000000000..15b3238acd Binary files /dev/null and b/docs/static/blog/twitter-banners/version-2.9-release-notes.png differ diff --git a/lerna.json b/lerna.json index c63a03f29a..74c6fc8da4 100644 --- a/lerna.json +++ b/lerna.json @@ -3,5 +3,5 @@ "packages": [ "packages/*" ], - "version": "2.8.2" + "version": "2.9.0" } diff --git a/packages/acceptance-tests/package-lock.json b/packages/acceptance-tests/package-lock.json index 968f6aa4d9..bcdc95c226 100644 --- a/packages/acceptance-tests/package-lock.json +++ b/packages/acceptance-tests/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/acceptance-tests", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/acceptance-tests/package.json b/packages/acceptance-tests/package.json index a2412ff445..a38dbdbdb4 100644 --- a/packages/acceptance-tests/package.json +++ b/packages/acceptance-tests/package.json @@ -1,7 +1,7 @@ { "name": "@foal/acceptance-tests", "private": true, - "version": "2.8.2", + "version": "2.9.0", "description": "Acceptance tests of the framework", "scripts": { "test": "mocha --require ts-node/register \"./src/**/*.{spec,feature}.{ts,tsx}\"", @@ -14,16 +14,16 @@ "node": ">=14" }, "dependencies": { - "@foal/core": "^2.8.2", - "@foal/graphiql": "^2.8.2", - "@foal/jwks-rsa": "^2.8.2", - "@foal/jwt": "^2.8.2", - "@foal/mongodb": "^2.8.2", - "@foal/redis": "^2.8.2", - "@foal/social": "^2.8.2", - "@foal/socket.io": "^2.8.2", - "@foal/typeorm": "^2.8.2", - "@foal/typestack": "^2.8.2", + "@foal/core": "^2.9.0", + "@foal/graphiql": "^2.9.0", + "@foal/jwks-rsa": "^2.9.0", + "@foal/jwt": "^2.9.0", + "@foal/mongodb": "^2.9.0", + "@foal/redis": "^2.9.0", + "@foal/social": "^2.9.0", + "@foal/socket.io": "^2.9.0", + "@foal/typeorm": "^2.9.0", + "@foal/typestack": "^2.9.0", "@grpc/grpc-js": "~1.2.12", "@grpc/proto-loader": "~0.6.0", "@socket.io/redis-adapter": "~7.2.0", diff --git a/packages/aws-s3/package-lock.json b/packages/aws-s3/package-lock.json index 9ba66947dc..216a934105 100644 --- a/packages/aws-s3/package-lock.json +++ b/packages/aws-s3/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/aws-s3", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/aws-s3/package.json b/packages/aws-s3/package.json index ae5d8f4a0a..7a3ed6bd6a 100644 --- a/packages/aws-s3/package.json +++ b/packages/aws-s3/package.json @@ -1,6 +1,6 @@ { "name": "@foal/aws-s3", - "version": "2.8.2", + "version": "2.9.0", "description": "AWS S3 storage components for FoalTS", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -45,8 +45,8 @@ "dependencies": { "@aws-sdk/client-s3": "~3.49.0", "@aws-sdk/lib-storage": "~3.49.0", - "@foal/core": "^2.8.2", - "@foal/storage": "^2.8.2" + "@foal/core": "^2.9.0", + "@foal/storage": "^2.9.0" }, "devDependencies": { "@types/mocha": "7.0.2", diff --git a/packages/cli/package-lock.json b/packages/cli/package-lock.json index 8fcd758b55..2fc7280c71 100644 --- a/packages/cli/package-lock.json +++ b/packages/cli/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/cli", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/cli/package.json b/packages/cli/package.json index 2327524d48..c75a19cff8 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@foal/cli", - "version": "2.8.2", + "version": "2.9.0", "description": "CLI tool for FoalTS", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/core/package-lock.json b/packages/core/package-lock.json index cbd4d4e093..c2f1bea23f 100644 --- a/packages/core/package-lock.json +++ b/packages/core/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/core", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/core/package.json b/packages/core/package.json index 47eec751fd..28cf4cf247 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@foal/core", - "version": "2.8.2", + "version": "2.9.0", "description": "Elegant and complete Node.Js web framework based on TypeScript", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -86,7 +86,7 @@ "reflect-metadata": "~0.1.13" }, "devDependencies": { - "@foal/internal-test": "^2.8.2", + "@foal/internal-test": "^2.9.0", "@types/mocha": "7.0.2", "@types/node": "10.17.24", "@types/supertest": "2.0.10", diff --git a/packages/examples/package-lock.json b/packages/examples/package-lock.json index ed8e3f58b1..14737fb479 100644 --- a/packages/examples/package-lock.json +++ b/packages/examples/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/examples", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/examples/package.json b/packages/examples/package.json index 59a36c5ea8..3bb240a28f 100644 --- a/packages/examples/package.json +++ b/packages/examples/package.json @@ -1,7 +1,7 @@ { "name": "@foal/examples", "private": true, - "version": "2.8.2", + "version": "2.9.0", "description": "FoalTs examples", "scripts": { "build": "tsc && copy-cli \"src/**/*.html\" build", @@ -44,14 +44,14 @@ }, "license": "MIT", "dependencies": { - "@foal/aws-s3": "^2.8.2", - "@foal/core": "^2.8.2", - "@foal/graphiql": "^2.8.2", - "@foal/graphql": "^2.8.2", - "@foal/social": "^2.8.2", - "@foal/storage": "^2.8.2", - "@foal/swagger": "^2.8.2", - "@foal/typeorm": "^2.8.2", + "@foal/aws-s3": "^2.9.0", + "@foal/core": "^2.9.0", + "@foal/graphiql": "^2.9.0", + "@foal/graphql": "^2.9.0", + "@foal/social": "^2.9.0", + "@foal/storage": "^2.9.0", + "@foal/swagger": "^2.9.0", + "@foal/typeorm": "^2.9.0", "better-sqlite3": "~7.5.1", "graphql": "^15.5.0", "source-map-support": "~0.5.19", @@ -59,7 +59,7 @@ "yamljs": "~0.3.0" }, "devDependencies": { - "@foal/cli": "^2.8.2", + "@foal/cli": "^2.9.0", "@types/mocha": "7.0.2", "@types/node": "10.17.24", "concurrently": "~5.3.0", diff --git a/packages/graphiql/package-lock.json b/packages/graphiql/package-lock.json index d63484449c..bfa384d54a 100644 --- a/packages/graphiql/package-lock.json +++ b/packages/graphiql/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/graphiql", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/graphiql/package.json b/packages/graphiql/package.json index 983c4d68b1..6129e15a1b 100644 --- a/packages/graphiql/package.json +++ b/packages/graphiql/package.json @@ -1,6 +1,6 @@ { "name": "@foal/graphiql", - "version": "2.8.2", + "version": "2.9.0", "description": "GraphiQL integration for FoalTS", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -40,7 +40,7 @@ "lib/" ], "dependencies": { - "@foal/core": "^2.8.2" + "@foal/core": "^2.9.0" }, "devDependencies": { "@types/mocha": "7.0.2", diff --git a/packages/graphql/package-lock.json b/packages/graphql/package-lock.json index 745700c387..445af12370 100644 --- a/packages/graphql/package-lock.json +++ b/packages/graphql/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/graphql", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/graphql/package.json b/packages/graphql/package.json index e9f408ca81..aca015d848 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@foal/graphql", - "version": "2.8.2", + "version": "2.9.0", "description": "GraphQL integration for FoalTS", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -40,7 +40,7 @@ "lib/" ], "dependencies": { - "@foal/core": "^2.8.2", + "@foal/core": "^2.9.0", "ajv": "~8.9.0", "glob": "~7.1.4" }, diff --git a/packages/internal-test/package-lock.json b/packages/internal-test/package-lock.json index bfb98b0c18..1bb4d95925 100644 --- a/packages/internal-test/package-lock.json +++ b/packages/internal-test/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/internal-test", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/internal-test/package.json b/packages/internal-test/package.json index 139b6f303c..97aab3d6c3 100644 --- a/packages/internal-test/package.json +++ b/packages/internal-test/package.json @@ -1,7 +1,7 @@ { "name": "@foal/internal-test", "private": true, - "version": "2.8.2", + "version": "2.9.0", "description": "Unpublished package used to run some tests.", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/jwks-rsa/package-lock.json b/packages/jwks-rsa/package-lock.json index 536126e9dd..4b422a6385 100644 --- a/packages/jwks-rsa/package-lock.json +++ b/packages/jwks-rsa/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/jwks-rsa", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/jwks-rsa/package.json b/packages/jwks-rsa/package.json index d60917b0f3..ef0c9daa07 100644 --- a/packages/jwks-rsa/package.json +++ b/packages/jwks-rsa/package.json @@ -1,6 +1,6 @@ { "name": "@foal/jwks-rsa", - "version": "2.8.2", + "version": "2.9.0", "description": "Integration of the library jwks-rsa with FoalTS", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -50,8 +50,8 @@ "@foal/jwt": "^2.0.0" }, "devDependencies": { - "@foal/core": "^2.8.2", - "@foal/jwt": "^2.8.2", + "@foal/core": "^2.9.0", + "@foal/jwt": "^2.9.0", "@types/mocha": "7.0.2", "@types/node": "10.17.24", "mocha": "~8.3.0", diff --git a/packages/jwt/package-lock.json b/packages/jwt/package-lock.json index 6f057de736..b7810450c1 100644 --- a/packages/jwt/package-lock.json +++ b/packages/jwt/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/jwt", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/jwt/package.json b/packages/jwt/package.json index 633a6c89dc..444861f614 100644 --- a/packages/jwt/package.json +++ b/packages/jwt/package.json @@ -1,6 +1,6 @@ { "name": "@foal/jwt", - "version": "2.8.2", + "version": "2.9.0", "description": "Authentication with JWT for FoalTS", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -42,7 +42,7 @@ "lib/" ], "dependencies": { - "@foal/core": "^2.8.2", + "@foal/core": "^2.9.0", "jsonwebtoken": "~8.5.0" }, "devDependencies": { diff --git a/packages/mongodb/package-lock.json b/packages/mongodb/package-lock.json index cb85ac6c5b..88b84b92e4 100644 --- a/packages/mongodb/package-lock.json +++ b/packages/mongodb/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/mongodb", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/mongodb/package.json b/packages/mongodb/package.json index 6fe7128c60..4daa4c93ac 100644 --- a/packages/mongodb/package.json +++ b/packages/mongodb/package.json @@ -1,6 +1,6 @@ { "name": "@foal/mongodb", - "version": "2.8.2", + "version": "2.9.0", "description": "MongoDB package for FoalTS session", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -45,7 +45,7 @@ "lib/" ], "dependencies": { - "@foal/core": "^2.8.2", + "@foal/core": "^2.9.0", "mongodb": "~4.3.1" }, "devDependencies": { diff --git a/packages/password/package-lock.json b/packages/password/package-lock.json index a89ef2c466..1e8336cf1f 100644 --- a/packages/password/package-lock.json +++ b/packages/password/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/password", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/password/package.json b/packages/password/package.json index 7c5390aaf8..ca872a7126 100644 --- a/packages/password/package.json +++ b/packages/password/package.json @@ -1,6 +1,6 @@ { "name": "@foal/password", - "version": "2.8.2", + "version": "2.9.0", "description": "Password utilities for FoalTS", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/packages/redis/package-lock.json b/packages/redis/package-lock.json index fafae9fd07..4d1b778d96 100644 --- a/packages/redis/package-lock.json +++ b/packages/redis/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/redis", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/redis/package.json b/packages/redis/package.json index f9fbfe203e..5474d35376 100644 --- a/packages/redis/package.json +++ b/packages/redis/package.json @@ -1,6 +1,6 @@ { "name": "@foal/redis", - "version": "2.8.2", + "version": "2.9.0", "description": "Redis sessions for FoalTS", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -41,7 +41,7 @@ "lib/" ], "dependencies": { - "@foal/core": "^2.8.2", + "@foal/core": "^2.9.0", "redis": "~4.0.2" }, "devDependencies": { diff --git a/packages/social/package-lock.json b/packages/social/package-lock.json index 1e4293eda5..0bb76352cd 100644 --- a/packages/social/package-lock.json +++ b/packages/social/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/social", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/social/package.json b/packages/social/package.json index 1eafe6f84b..048571553c 100644 --- a/packages/social/package.json +++ b/packages/social/package.json @@ -1,6 +1,6 @@ { "name": "@foal/social", - "version": "2.8.2", + "version": "2.9.0", "description": "Social authentication for FoalTS", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -52,7 +52,7 @@ "lib/" ], "dependencies": { - "@foal/core": "^2.8.2", + "@foal/core": "^2.9.0", "axios": "0.26.1" }, "devDependencies": { diff --git a/packages/socket.io/package-lock.json b/packages/socket.io/package-lock.json index b6415a46cb..e750ada7f2 100644 --- a/packages/socket.io/package-lock.json +++ b/packages/socket.io/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/socket.io", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/socket.io/package.json b/packages/socket.io/package.json index 25cd7b7d72..1f1a4efc87 100644 --- a/packages/socket.io/package.json +++ b/packages/socket.io/package.json @@ -1,6 +1,6 @@ { "name": "@foal/socket.io", - "version": "2.8.2", + "version": "2.9.0", "description": "Websocket integration for FoalTS", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -55,7 +55,7 @@ "typescript": "~4.5.4" }, "dependencies": { - "@foal/core": "^2.8.2", + "@foal/core": "^2.9.0", "reflect-metadata": "~0.1.13", "socket.io": "~4.5.0" } diff --git a/packages/storage/package-lock.json b/packages/storage/package-lock.json index 9d157d2904..e869636e6b 100644 --- a/packages/storage/package-lock.json +++ b/packages/storage/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/storage", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/storage/package.json b/packages/storage/package.json index ef3d6ce335..4aef0a02f2 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -1,6 +1,6 @@ { "name": "@foal/storage", - "version": "2.8.2", + "version": "2.9.0", "description": "Storage components for FoalTS", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -44,12 +44,12 @@ "lib/" ], "dependencies": { - "@foal/core": "^2.8.2", + "@foal/core": "^2.9.0", "busboy": "~0.3.1", "mime": "~2.4.4" }, "devDependencies": { - "@foal/internal-test": "^2.8.2", + "@foal/internal-test": "^2.9.0", "@types/mocha": "7.0.2", "@types/node": "10.17.24", "@types/supertest": "2.0.10", diff --git a/packages/swagger/package-lock.json b/packages/swagger/package-lock.json index c933ee5479..aed6c0d714 100644 --- a/packages/swagger/package-lock.json +++ b/packages/swagger/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/swagger", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/swagger/package.json b/packages/swagger/package.json index 19dae7396b..78a12dd4e7 100644 --- a/packages/swagger/package.json +++ b/packages/swagger/package.json @@ -1,6 +1,6 @@ { "name": "@foal/swagger", - "version": "2.8.2", + "version": "2.9.0", "description": "Swagger UI for FoalTS", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -43,7 +43,7 @@ "lib/" ], "dependencies": { - "@foal/core": "^2.8.2", + "@foal/core": "^2.9.0", "swagger-ui-dist": "~3.52.5" }, "devDependencies": { diff --git a/packages/typeorm/package-lock.json b/packages/typeorm/package-lock.json index 16a09f87ef..6d8a37bd38 100644 --- a/packages/typeorm/package-lock.json +++ b/packages/typeorm/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/typeorm", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/typeorm/package.json b/packages/typeorm/package.json index 8937c45cec..3a862768c0 100644 --- a/packages/typeorm/package.json +++ b/packages/typeorm/package.json @@ -1,6 +1,6 @@ { "name": "@foal/typeorm", - "version": "2.8.2", + "version": "2.9.0", "description": "FoalTS integration of TypeORM", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -48,7 +48,7 @@ "lib/" ], "dependencies": { - "@foal/core": "^2.8.2" + "@foal/core": "^2.9.0" }, "peerDependencies": { "typeorm": "^0.2.6" diff --git a/packages/typestack/package-lock.json b/packages/typestack/package-lock.json index d8a39e40f0..0094507533 100644 --- a/packages/typestack/package-lock.json +++ b/packages/typestack/package-lock.json @@ -1,6 +1,6 @@ { "name": "@foal/typestack", - "version": "2.8.2", + "version": "2.9.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/typestack/package.json b/packages/typestack/package.json index 413b13a0b1..3c0534d488 100644 --- a/packages/typestack/package.json +++ b/packages/typestack/package.json @@ -1,6 +1,6 @@ { "name": "@foal/typestack", - "version": "2.8.2", + "version": "2.9.0", "description": "FoalTS for validation and serialization using TypeStack classes", "main": "./lib/index.js", "types": "./lib/index.d.ts", @@ -48,7 +48,7 @@ "class-validator": "^0.10.0" }, "dependencies": { - "@foal/core": "^2.8.2" + "@foal/core": "^2.9.0" }, "devDependencies": { "@types/mocha": "7.0.2",