You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our logic is to download current origin list from our database using Django ORM. However, currently this is not possible because of the exception: django.core.exceptions.SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async
Wrapping the ORM part with sync_to_async will make the whole function asynchronous but then it must be handled correctly by supertokens (using await keyword). The only solution is to update this repo to handle asynchronous origin function.
The text was updated successfully, but these errors were encountered:
hey @aprilis this is a good suggestion. In the meantime though, you can load up the list of origins from the database / refresh them in the background periodically and then read from the in memory list.
We want to use
origin
function inInputAppInfo
as described in https://supertokens.com/docs/emailpassword/common-customizations/multiple-clients.Our logic is to download current origin list from our database using Django ORM. However, currently this is not possible because of the exception:
django.core.exceptions.SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async
Wrapping the ORM part with
sync_to_async
will make the whole function asynchronous but then it must be handled correctly by supertokens (usingawait
keyword). The only solution is to update this repo to handle asynchronousorigin
function.The text was updated successfully, but these errors were encountered: