From 79336700729da563bbdf6798a602a3c42e1609ad Mon Sep 17 00:00:00 2001 From: Juan Pablo Garcia Ripa Date: Wed, 9 Jul 2025 22:41:36 +0200 Subject: [PATCH] fix typos in docs Signed-off-by: Juan Pablo Garcia Ripa --- docs/auth/service-to-service-auth.md | 4 ++-- docs/backend-system/architecture/03-services.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/auth/service-to-service-auth.md b/docs/auth/service-to-service-auth.md index 4d8829d91d..322edbe6b6 100644 --- a/docs/auth/service-to-service-auth.md +++ b/docs/auth/service-to-service-auth.md @@ -444,13 +444,13 @@ const decoratedPluginTokenHandler = createServiceFactory({ }); ``` -### ExternalTokenHandler decoration +### Custom ExternalTokenHandler The `externalTokenTypeHandlersRef` can be used to add custom external token handlers to the default implementation. The returned object from the factory function must have a `type` property which is used to identify the handler. The `factory` method is called with an array of `Config` objects, for the given type. The factory method can return a single handler or an array of handlers. The handlers are then used to handle the token for the given type. -For example, if we whant to add a custom external token handler for the `custom` type: +For example, if we want to add a custom external token handler for the `custom` type: our config would look like this: diff --git a/docs/backend-system/architecture/03-services.md b/docs/backend-system/architecture/03-services.md index 3b168b81e3..f6722496e5 100644 --- a/docs/backend-system/architecture/03-services.md +++ b/docs/backend-system/architecture/03-services.md @@ -225,7 +225,7 @@ This allows you to provide more advanced options for the service implementation ## Multiton -By default the service reference will point to a singleton instance of the service. This meand if a new service factory uses this reference will override the previous one. This is the most common use-case, but in some cases you may want to have multiple instances of the same service. +By default the service reference will point to a singleton instance of the service. This mean if a new service factory uses this reference will override the previous one. This is the most common use-case, but in some cases you may want to have multiple instances of the same service. For some services, is desirable to extend the functionality instead of overriding it. For example, some services could have many handler to address a specific event, and you may want to add a new handler instead of overriding the previous one. In this case, you can use the `multiton` option when creating the service reference: ```ts @@ -242,7 +242,7 @@ export const fooServiceRef = createServiceRef({ }); ``` -When adding this serviceRef ad dependency to a factory, the factory will receive an array of instances instead of a single instance: +When adding this `serviceRef` as a dependency to a factory, the factory will receive an array of instances instead of a single instance: ```ts deps: {fooServices: fooServiceRef},