Will // Work Louder
03/25/2022, 5:08 PMrp
03/25/2022, 6:23 PMrp
03/26/2022, 4:15 AMFernando
03/26/2022, 8:59 AMrp
03/26/2022, 9:28 AMrp
03/26/2022, 9:07 AMrp
03/26/2022, 9:07 AMrp
03/26/2022, 9:11 AMFernando
03/26/2022, 9:12 AMrp
03/26/2022, 9:28 AMpepegc
03/26/2022, 11:04 AMsupertokens-python
not allowing the latest fast-api
version? (0.75). Installing your package is generating issues downstream. Yesterday I managed to manually install all the packages but now the resulting requirements.txt is 'broken' for my cofounder. Maybe some dependency restrictions could be relaxed?rp
03/26/2022, 11:15 AMJeremyEastham
03/26/2022, 4:29 PMsudo-prompt
, but I'm not sure how to call it from a npm script like I can call tsc
, eslint
, cross-env
, or ts-node-dev
.JeremyEastham
03/26/2022, 8:13 PMsupertokens list
?
html
io.supertokens.cli.httpRequest.HTTPResponseException: Http error. Status Code: 404. Message: <!doctype html><html lang="en"><head><title>HTTP Status 404 รข?? Not Found</title><style type="text/css"><!--css removed--></style></head><body><h1>HTTP Status 404 รข?? Not Found</h1><hr class="line" /><p><b>Type</b> Status Report</p><p><b>Message</b> Not found</p><p><b>Description</b> The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.</p><hr class="line" /><h3>Apache Tomcat/8.5.47</h3></body></html>
at io.supertokens.cli.httpRequest.HTTPRequest.sendGETRequest(HTTPRequest.java:100)
at io.supertokens.cli.processes.Processes$RunningProcess.fetchConfigFilePath(Processes.java:48)
at io.supertokens.cli.commandHandler.list.ListHandler.doCommand(ListHandler.java:35)
at io.supertokens.cli.commandHandler.CommandHandler.handleCommand(CommandHandler.java:31)
at io.supertokens.cli.Main.start(Main.java:101)
at io.supertokens.cli.Main.main(Main.java:49)
Could not execute list command.
exiting
rp
03/27/2022, 4:45 AMrajivharlalka
03/27/2022, 10:37 AMrp
03/27/2022, 10:41 AMfrom flask import g
You can read more about g
here: https://flask.palletsprojects.com/en/2.0.x/appcontext/rp
03/27/2022, 10:41 AMrajivharlalka
03/27/2022, 10:43 AMrajivharlalka
03/27/2022, 11:09 AMTechnoWill
03/27/2022, 4:59 PMrajivharlalka
03/27/2022, 6:46 PMpython
def override_thirdpartyemailpassword_apis(original_implementation: APIInterface):
original_emailpassword_sign_up_post = original_implementation.emailpassword_sign_up_post
async def emailpassword_sign_up_post(form_fields: List[FormField],api_options: EmailPasswordAPIOptions, user_context: Dict[str, Any]):
body=await api_options.request.json()
user_context["role"] = body["role"]
return await original_emailpassword_sign_up_post(form_fields, api_options, user_context)
original_implementation.emailpassword_sign_up_post = emailpassword_sign_up_post
return original_implementation
def override_functions(original_implementation):
original_implementation_create_new_session = original_implementation.create_new_session
async def create_new_session(request, user_id,
access_token_payload,
session_data, user_context):
....
....
print(user_context)
role = user_id;
access_token_payload["role"] = role
return await original_implementation_create_new_session(request, user_id, access_token_payload, session_data, user_context)
original_implementation.create_new_session = create_new_session
return original_implementation
On hitting the sign up api, not getting the user_context populated with the role object. But the session is getting created after the user_context is getting defined through the overriding function. Is there I getting wrong in the workflow of auth ๐คrp
03/27/2022, 6:48 PMshorthair_[]
03/27/2022, 8:17 PMshorthair_[]
03/27/2022, 8:17 PMshorthair_[]
03/27/2022, 8:17 PMshorthair_[]
03/27/2022, 8:18 PMshorthair_[]
03/27/2022, 8:18 PMshorthair_[]
03/27/2022, 8:19 PM