Skip to content

seeking authlib.integrations.quart_client #429

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

Closed
jonathonfletcher opened this issue Feb 19, 2022 · 1 comment
Closed

seeking authlib.integrations.quart_client #429

jonathonfletcher opened this issue Feb 19, 2022 · 1 comment

Comments

@jonathonfletcher
Copy link

jonathonfletcher commented Feb 19, 2022

Is your feature request related to a problem? Please describe.

I am migrating a project from Flask to Quart - Quart being an asyncio reimplementation of the Flask api.

The migration is solely a python sync to python async migration. No functionality changes, just the adoption of async via migration from Flask to Quart.

In the Flask project, I am using:
from authlib.integrations.flask_client import OAuth
and it works well with my OAuth2 provider (thank you).

Quart implements the Flask api, and I am having (basic python sync / async) problems calling the sync flask_client.OAuth from the async Quart code.

oauth = OAuth(app)
oauth.register( .. provider .. )

@app.route("/sso/login", methods=["GET"])
async def sso_login():
    redirect_uri = url_for("sso_callback", _external=True, _scheme="https")

    # fails here due to calling into the sync flask api underneath OAuth
    return oauth.provider.authorize_redirect(redirect_uri)

Describe the solution you'd like

In my Quart project, I would love to use:
from authlib.integrations.quart_client import OAuth
and have this work with async Quart and Quart's async implementation of the Flask api.

Describe alternatives you've considered

I have looked at rolling my own OAuth client (using Authlib's OAuth2Session) and have not managed to get it working - lack of familiarity with Authlib and OAuth internals.

See #430

@lepture
Copy link
Owner

lepture commented Dec 6, 2022

Not going to add as built-in integration. However, you can create your own package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants