Skip to content

Support asynchronous origin function #507

Open
@aprilis

Description

@aprilis

We want to use origin function in InputAppInfo 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 (using await keyword). The only solution is to update this repo to handle asynchronous origin function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions