0

A bit of context:

I've been working with Superset, a flask-based application for data exploration and visualization. The app is built on top of a flask framework called Flask-AppBuilder that uses authlib as the auth library to implement its authentication strategies -- more info here.

Now, we configured superset to authenticate with a custom authentication server that supports Oauth2 using Django Oauth Toolkit. The server supports JWT tokens for authorization, so we tried configuring superset > flask-appbuilder > authlib to obtain JWT tokens instead of Bearer -- the apparent default.

The problem:

After modifying our app so it could get JWT instead of bearer -- basically we got our token using the auth flask client specifying the token_type:

resp = FlaskOauthClient.authorize_access_token(token_type="jwt")

https://github.com/lepture/authlib/blob/master/authlib/integrations/flask_client/apps.py#L73-L107

We got this error:

jwt-unsupported-type

After digging for a bit on the repo source code, we found: https://github.com/lepture/authlib/blob/master/authlib/integrations/requests_client/oauth2_session.py#L16-L17

At this point, I'm wondering if something else can be done so we can use JWT. Do you folks have any other suggestion?

I'm posting this here instead of the repository as the maintainers on the repo issues suggested it:

This issue tracker is used for bug report, please don't ask for help here. Instead, use StackOverflow with a tag of Authlib.

0 Answers0