From 6113311bea406479da98c27ab547e125e2a9acf1 Mon Sep 17 00:00:00 2001 From: rishabhpoddar Date: Thu, 21 Dec 2023 12:18:08 +0530 Subject: [PATCH] adds examples for overrides use cases --- v2/emailpassword/advanced-customizations/overview.mdx | 8 ++++++-- v2/passwordless/advanced-customizations/overview.mdx | 8 ++++++-- v2/session/advanced-customizations/overview.mdx | 8 ++++++-- v2/thirdparty/advanced-customizations/overview.mdx | 8 ++++++-- .../advanced-customizations/overview.mdx | 8 ++++++-- .../advanced-customizations/overview.mdx | 8 ++++++-- 6 files changed, 36 insertions(+), 12 deletions(-) diff --git a/v2/emailpassword/advanced-customizations/overview.mdx b/v2/emailpassword/advanced-customizations/overview.mdx index dc8f3f288..e80d2f4bb 100644 --- a/v2/emailpassword/advanced-customizations/overview.mdx +++ b/v2/emailpassword/advanced-customizations/overview.mdx @@ -17,7 +17,11 @@ This section will guide you on overriding our default behaviour to achieve custo This will allow you to customize parts of the default UI without having to implement that whole UI widget from scratch ### 2) Override frontend functions -This will allow you to change the way our widgets query the backend. This can be useful for operations like implementing your own session management system that works with our auth widgets. +This will allow you to change the way our widgets query the backend. Example use cases are: +- Sending analytics events based on user action. +- Custom caching logic if needed. +- Providing a custom router for routing that happens within our pre built UI. For example, integrating the NextJS router. +- Implementing your own session management system that works with our auth widgets. ### 3) Override backend functions This will allow you to change the behaviour of the functions that are used by the backend APIs exposed via our SDK. It can be useful for migration, using your own userID format, custom validation logic etc... @@ -26,7 +30,7 @@ This will allow you to change the behaviour of the functions that are used by th This will allow you to override the behaviour of any of the backend APIs our SDK exposes. It can be used for post / pre API callbacks or handling custom API input / output that deviate from our API specifications. ### 5) Frontend Hooks -This allows you to change the request (body, headers, url etc) that is sent to your server, handle events fired by various user actions, and control how a recipe redirects a user. +This allows you to change the request (body, headers, url etc) that is sent to your server, handle events fired by various user actions, and control how a recipe redirects a user. For example, you can use this to add an invite code to our sign up API call. ### 6) User Contexts This allows you to pass information across recipe functions so that customisations can be made based on a specific "execution context". diff --git a/v2/passwordless/advanced-customizations/overview.mdx b/v2/passwordless/advanced-customizations/overview.mdx index dc8f3f288..e80d2f4bb 100644 --- a/v2/passwordless/advanced-customizations/overview.mdx +++ b/v2/passwordless/advanced-customizations/overview.mdx @@ -17,7 +17,11 @@ This section will guide you on overriding our default behaviour to achieve custo This will allow you to customize parts of the default UI without having to implement that whole UI widget from scratch ### 2) Override frontend functions -This will allow you to change the way our widgets query the backend. This can be useful for operations like implementing your own session management system that works with our auth widgets. +This will allow you to change the way our widgets query the backend. Example use cases are: +- Sending analytics events based on user action. +- Custom caching logic if needed. +- Providing a custom router for routing that happens within our pre built UI. For example, integrating the NextJS router. +- Implementing your own session management system that works with our auth widgets. ### 3) Override backend functions This will allow you to change the behaviour of the functions that are used by the backend APIs exposed via our SDK. It can be useful for migration, using your own userID format, custom validation logic etc... @@ -26,7 +30,7 @@ This will allow you to change the behaviour of the functions that are used by th This will allow you to override the behaviour of any of the backend APIs our SDK exposes. It can be used for post / pre API callbacks or handling custom API input / output that deviate from our API specifications. ### 5) Frontend Hooks -This allows you to change the request (body, headers, url etc) that is sent to your server, handle events fired by various user actions, and control how a recipe redirects a user. +This allows you to change the request (body, headers, url etc) that is sent to your server, handle events fired by various user actions, and control how a recipe redirects a user. For example, you can use this to add an invite code to our sign up API call. ### 6) User Contexts This allows you to pass information across recipe functions so that customisations can be made based on a specific "execution context". diff --git a/v2/session/advanced-customizations/overview.mdx b/v2/session/advanced-customizations/overview.mdx index dc8f3f288..e80d2f4bb 100644 --- a/v2/session/advanced-customizations/overview.mdx +++ b/v2/session/advanced-customizations/overview.mdx @@ -17,7 +17,11 @@ This section will guide you on overriding our default behaviour to achieve custo This will allow you to customize parts of the default UI without having to implement that whole UI widget from scratch ### 2) Override frontend functions -This will allow you to change the way our widgets query the backend. This can be useful for operations like implementing your own session management system that works with our auth widgets. +This will allow you to change the way our widgets query the backend. Example use cases are: +- Sending analytics events based on user action. +- Custom caching logic if needed. +- Providing a custom router for routing that happens within our pre built UI. For example, integrating the NextJS router. +- Implementing your own session management system that works with our auth widgets. ### 3) Override backend functions This will allow you to change the behaviour of the functions that are used by the backend APIs exposed via our SDK. It can be useful for migration, using your own userID format, custom validation logic etc... @@ -26,7 +30,7 @@ This will allow you to change the behaviour of the functions that are used by th This will allow you to override the behaviour of any of the backend APIs our SDK exposes. It can be used for post / pre API callbacks or handling custom API input / output that deviate from our API specifications. ### 5) Frontend Hooks -This allows you to change the request (body, headers, url etc) that is sent to your server, handle events fired by various user actions, and control how a recipe redirects a user. +This allows you to change the request (body, headers, url etc) that is sent to your server, handle events fired by various user actions, and control how a recipe redirects a user. For example, you can use this to add an invite code to our sign up API call. ### 6) User Contexts This allows you to pass information across recipe functions so that customisations can be made based on a specific "execution context". diff --git a/v2/thirdparty/advanced-customizations/overview.mdx b/v2/thirdparty/advanced-customizations/overview.mdx index dc8f3f288..e80d2f4bb 100644 --- a/v2/thirdparty/advanced-customizations/overview.mdx +++ b/v2/thirdparty/advanced-customizations/overview.mdx @@ -17,7 +17,11 @@ This section will guide you on overriding our default behaviour to achieve custo This will allow you to customize parts of the default UI without having to implement that whole UI widget from scratch ### 2) Override frontend functions -This will allow you to change the way our widgets query the backend. This can be useful for operations like implementing your own session management system that works with our auth widgets. +This will allow you to change the way our widgets query the backend. Example use cases are: +- Sending analytics events based on user action. +- Custom caching logic if needed. +- Providing a custom router for routing that happens within our pre built UI. For example, integrating the NextJS router. +- Implementing your own session management system that works with our auth widgets. ### 3) Override backend functions This will allow you to change the behaviour of the functions that are used by the backend APIs exposed via our SDK. It can be useful for migration, using your own userID format, custom validation logic etc... @@ -26,7 +30,7 @@ This will allow you to change the behaviour of the functions that are used by th This will allow you to override the behaviour of any of the backend APIs our SDK exposes. It can be used for post / pre API callbacks or handling custom API input / output that deviate from our API specifications. ### 5) Frontend Hooks -This allows you to change the request (body, headers, url etc) that is sent to your server, handle events fired by various user actions, and control how a recipe redirects a user. +This allows you to change the request (body, headers, url etc) that is sent to your server, handle events fired by various user actions, and control how a recipe redirects a user. For example, you can use this to add an invite code to our sign up API call. ### 6) User Contexts This allows you to pass information across recipe functions so that customisations can be made based on a specific "execution context". diff --git a/v2/thirdpartyemailpassword/advanced-customizations/overview.mdx b/v2/thirdpartyemailpassword/advanced-customizations/overview.mdx index dc8f3f288..e80d2f4bb 100644 --- a/v2/thirdpartyemailpassword/advanced-customizations/overview.mdx +++ b/v2/thirdpartyemailpassword/advanced-customizations/overview.mdx @@ -17,7 +17,11 @@ This section will guide you on overriding our default behaviour to achieve custo This will allow you to customize parts of the default UI without having to implement that whole UI widget from scratch ### 2) Override frontend functions -This will allow you to change the way our widgets query the backend. This can be useful for operations like implementing your own session management system that works with our auth widgets. +This will allow you to change the way our widgets query the backend. Example use cases are: +- Sending analytics events based on user action. +- Custom caching logic if needed. +- Providing a custom router for routing that happens within our pre built UI. For example, integrating the NextJS router. +- Implementing your own session management system that works with our auth widgets. ### 3) Override backend functions This will allow you to change the behaviour of the functions that are used by the backend APIs exposed via our SDK. It can be useful for migration, using your own userID format, custom validation logic etc... @@ -26,7 +30,7 @@ This will allow you to change the behaviour of the functions that are used by th This will allow you to override the behaviour of any of the backend APIs our SDK exposes. It can be used for post / pre API callbacks or handling custom API input / output that deviate from our API specifications. ### 5) Frontend Hooks -This allows you to change the request (body, headers, url etc) that is sent to your server, handle events fired by various user actions, and control how a recipe redirects a user. +This allows you to change the request (body, headers, url etc) that is sent to your server, handle events fired by various user actions, and control how a recipe redirects a user. For example, you can use this to add an invite code to our sign up API call. ### 6) User Contexts This allows you to pass information across recipe functions so that customisations can be made based on a specific "execution context". diff --git a/v2/thirdpartypasswordless/advanced-customizations/overview.mdx b/v2/thirdpartypasswordless/advanced-customizations/overview.mdx index dc8f3f288..e80d2f4bb 100644 --- a/v2/thirdpartypasswordless/advanced-customizations/overview.mdx +++ b/v2/thirdpartypasswordless/advanced-customizations/overview.mdx @@ -17,7 +17,11 @@ This section will guide you on overriding our default behaviour to achieve custo This will allow you to customize parts of the default UI without having to implement that whole UI widget from scratch ### 2) Override frontend functions -This will allow you to change the way our widgets query the backend. This can be useful for operations like implementing your own session management system that works with our auth widgets. +This will allow you to change the way our widgets query the backend. Example use cases are: +- Sending analytics events based on user action. +- Custom caching logic if needed. +- Providing a custom router for routing that happens within our pre built UI. For example, integrating the NextJS router. +- Implementing your own session management system that works with our auth widgets. ### 3) Override backend functions This will allow you to change the behaviour of the functions that are used by the backend APIs exposed via our SDK. It can be useful for migration, using your own userID format, custom validation logic etc... @@ -26,7 +30,7 @@ This will allow you to change the behaviour of the functions that are used by th This will allow you to override the behaviour of any of the backend APIs our SDK exposes. It can be used for post / pre API callbacks or handling custom API input / output that deviate from our API specifications. ### 5) Frontend Hooks -This allows you to change the request (body, headers, url etc) that is sent to your server, handle events fired by various user actions, and control how a recipe redirects a user. +This allows you to change the request (body, headers, url etc) that is sent to your server, handle events fired by various user actions, and control how a recipe redirects a user. For example, you can use this to add an invite code to our sign up API call. ### 6) User Contexts This allows you to pass information across recipe functions so that customisations can be made based on a specific "execution context".