-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overriding createNewSession is not working + framework dependency issue #82
Comments
Which version of the SDK are you using? |
It seems that you are using the latest version cause |
|
Can you try upgrading to the latest version of the python SDK (0.5.0) and seeing if this error still persists? The error is from the python SDK, so the core won't have any error logs. Since the python SDK API is throwing an error, you can add a global exception handler in fastapi and print the error there. But first do try version 0.5.0 of the python SDK |
Trying to use 0.5.0 makes my service break with
And I'm not using django. |
Okay thanks. Releasing a fix for that ASAP. |
You might need to add flask (and other frameworks/packages too) |
Thanks for pointing out this issue @maccinza . We have released a fix in our CICD pipeline + changed the tests to make sure that issues like this make the tests fail. It should be a few hours of running tests before I can release the new version. |
I installed both django and flask to keep testing 0.5.0 and I can say it solves my initial issue: The session override works properly and my integration tests are passing. Thanks for all the help @rishabhpoddar ! |
Great! I'll close this issue once the new version is released and then you can remove the flask and django dependencies. |
hey @maccinza I have released a new version of the SDK: https://pypi.org/project/supertokens-python/0.5.1/ That should work without you having to add dependencies on django and flask. Closing this issue for now. |
I have a fastapi project using supertokens-python with the following init configuration:
I have some integration tests for the passwordless login flow that are working normally with that configuration.
I would like to add custom data to the user's session access token, so I tried following the docs: https://supertokens.com/docs/passwordless/common-customizations/user-roles/assigning-session-roles
And updated the configuration with my override_functions implementation:
Now the integration test for the passwordless flow fails when trying to consume the created code (POSTing to
/api/signinup/code/consume
) with a 500. I even tried using an empty override implementation as it follows but it still returns the 500:The text was updated successfully, but these errors were encountered: