Skip to content

Is a sync version planned, that doesn't just wrap the asyncio one? #113

Open

Description

@CaselIT

Checklist

  • I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

Hi,

I've noticed that the api client is async only. Is a non-async version planned?

Describe the ideal solution

Have a sync version of ApiClient that can be used with non-async code

Alternatives and current workarounds

No response

Additional context

No response

Activity

  1. rmad17 commented on Nov 18, 2026

    @rmad17
    Contributor

    Hi @CaselIT, thank you for opening this.

    We'd like to understand your use case better so we can think about this properly. A few questions:

    1. What kind of application are you validating tokens in? For example Flask, Django, a plain WSGI app, a CLI, or a worker or script.
    2. Is a sync-only runtime a hard constraint for you, or is the async client hard to adopt in your codebase?
    3. Is the concern about overhead, event loop handling (for example calling asyncio.run per request), or something else?

    Any snippet of how you call the client would help too.

  2. CaselIT commented on Nov 18, 2026

    @CaselIT
    Author

    What kind of application are you validating tokens in? For example Flask, Django, a plain WSGI app, a CLI, or a worker or script.

    A wsgi app that's written in falcon, but for all intent and purposes it would behave the same if it were in flask

    Is a sync-only runtime a hard constraint for you, or is the async client hard to adopt in your codebase?
    Is the concern about overhead, event loop handling (for example calling asyncio.run per request), or something else?

    The current application is sync, with no async parts, so the async client would be hard to adopt. Overall I don't think it would be a great approach to create a new loop per request using asyncio.run. I mean my preference would be use some other library instead.

    Any snippet of how you call the client would help too.

    I don't have anything specific, at it's a classic wsgi application that authenticates the caller before calling the responder.

  3. CaselIT commented on Nov 18, 2026

    @CaselIT
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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