auth0 / auth0-python

Auth0 SDK for Python
https://auth0-python.readthedocs.io
MIT License
515 stars 167 forks source link

Fix async auth client #499

Closed adamjmcgrath closed 1 year ago

adamjmcgrath commented 1 year ago

Changes

Asyncifying authentication classes doesn't work because the asyncify method was assuming the wrong signature.

References

fixes #498

Testing

AsyncGetToken = asyncify(GetToken)

get_token = AsyncGetToken(domain, client_id)

response = await self.get_token.login_async(
    username=username,
    password=password,
    realm="Username-Password-Authentication",
    scope="openid profile email",
)

Checklist