Skip to content

Commit

Permalink
fixes snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Oct 4, 2023
1 parent 88dd719 commit c603fdf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions v2/thirdparty/custom-ui/thirdparty-login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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"]

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions v2/thirdpartyemailpassword/custom-ui/thirdparty-login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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"]

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions v2/thirdpartypasswordless/custom-ui/thirdparty-login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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"]

Expand All @@ -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
Expand Down

0 comments on commit c603fdf

Please sign in to comment.