From c603fdf90b28c740e1f077d17a63a92825b7dab5 Mon Sep 17 00:00:00 2001 From: rishabhpoddar Date: Wed, 4 Oct 2023 17:07:54 +0530 Subject: [PATCH] fixes snippet --- v2/thirdparty/custom-ui/thirdparty-login.mdx | 6 +++--- v2/thirdpartyemailpassword/custom-ui/thirdparty-login.mdx | 6 +++--- v2/thirdpartypasswordless/custom-ui/thirdparty-login.mdx | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/v2/thirdparty/custom-ui/thirdparty-login.mdx b/v2/thirdparty/custom-ui/thirdparty-login.mdx index d3bdd34ab..c811f8f4d 100644 --- a/v2/thirdparty/custom-ui/thirdparty-login.mdx +++ b/v2/thirdparty/custom-ui/thirdparty-login.mdx @@ -525,7 +525,7 @@ func main() { ```python from supertokens_python.recipe import ^{codeImportRecipeName} from supertokens_python.recipe.^{codeImportRecipeName}.interfaces import APIInterface, ^{pythonThirdPartyAPIOptions} -from typing import Union, Dict, Any +from typing import Dict, Any # highlight-start def override_thirdparty_apis(original_implementation: APIInterface): @@ -535,7 +535,7 @@ def override_thirdparty_apis(original_implementation: APIInterface): form_post_info: Dict[str, Any], api_options: ^{pythonThirdPartyAPIOptions}, user_context: Dict[str, Any] - ) -> Union[Any, Any, None]: + ): # form_post_info contains all the query params attached by Apple state = form_post_info["state"] @@ -554,7 +554,7 @@ def override_thirdparty_apis(original_implementation: APIInterface): api_options.response.set_status_code(303) api_options.response.set_html_content("") else: - return original_apple_redirect_post(form_post_info, api_options, user_context) + return await original_apple_redirect_post(form_post_info, api_options, user_context) original_implementation.apple_redirect_handler_post = apple_redirect_handler_post return original_implementation diff --git a/v2/thirdpartyemailpassword/custom-ui/thirdparty-login.mdx b/v2/thirdpartyemailpassword/custom-ui/thirdparty-login.mdx index f7fb3ffd3..78aa07d32 100644 --- a/v2/thirdpartyemailpassword/custom-ui/thirdparty-login.mdx +++ b/v2/thirdpartyemailpassword/custom-ui/thirdparty-login.mdx @@ -528,7 +528,7 @@ func main() { ```python from supertokens_python.recipe import ^{codeImportRecipeName} from supertokens_python.recipe.^{codeImportRecipeName}.interfaces import APIInterface, ^{pythonThirdPartyAPIOptions} -from typing import Union, Dict, Any +from typing import Dict, Any # highlight-start def override_thirdparty_apis(original_implementation: APIInterface): @@ -538,7 +538,7 @@ def override_thirdparty_apis(original_implementation: APIInterface): form_post_info: Dict[str, Any], api_options: ^{pythonThirdPartyAPIOptions}, user_context: Dict[str, Any] - ) -> Union[Any, Any, None]: + ): # form_post_info contains all the query params attached by Apple state = form_post_info["state"] @@ -557,7 +557,7 @@ def override_thirdparty_apis(original_implementation: APIInterface): api_options.response.set_status_code(303) api_options.response.set_html_content("") else: - return original_apple_redirect_post(form_post_info, api_options, user_context) + return await original_apple_redirect_post(form_post_info, api_options, user_context) original_implementation.apple_redirect_handler_post = apple_redirect_handler_post return original_implementation diff --git a/v2/thirdpartypasswordless/custom-ui/thirdparty-login.mdx b/v2/thirdpartypasswordless/custom-ui/thirdparty-login.mdx index f7fe13f52..062324fd0 100644 --- a/v2/thirdpartypasswordless/custom-ui/thirdparty-login.mdx +++ b/v2/thirdpartypasswordless/custom-ui/thirdparty-login.mdx @@ -528,7 +528,7 @@ func main() { ```python from supertokens_python.recipe import ^{codeImportRecipeName} from supertokens_python.recipe.^{codeImportRecipeName}.interfaces import APIInterface, ^{pythonThirdPartyAPIOptions} -from typing import Union, Dict, Any +from typing import Dict, Any # highlight-start def override_thirdparty_apis(original_implementation: APIInterface): @@ -538,7 +538,7 @@ def override_thirdparty_apis(original_implementation: APIInterface): form_post_info: Dict[str, Any], api_options: ^{pythonThirdPartyAPIOptions}, user_context: Dict[str, Any] - ) -> Union[Any, Any, None]: + ): # form_post_info contains all the query params attached by Apple state = form_post_info["state"] @@ -557,7 +557,7 @@ def override_thirdparty_apis(original_implementation: APIInterface): api_options.response.set_status_code(303) api_options.response.set_html_content("") else: - return original_apple_redirect_post(form_post_info, api_options, user_context) + return await original_apple_redirect_post(form_post_info, api_options, user_context) original_implementation.apple_redirect_handler_post = apple_redirect_handler_post return original_implementation