Scout: Replace Flask-OAuthlib with Authlib

Created on 16 Jan 2019  路  7Comments  路  Source: Clinical-Genomics/scout

cg is using Flask-Dance and Scout is using Flask-OAuth to handle oauth requests. The latter has been abandoned in favour of Flask-Dance: https://github.com/mitsuhiko/flask-oauth

The problem that arises is that Flask-Oauth requires oauthlib<3.0.0 but Flask-Dance's requirement requests-oauthlib requires oauthlib>=3.0.0.
https://github.com/mitsuhiko/flask-oauth/blob/master/setup.py#L31
https://github.com/requests/requests-oauthlib/blob/master/requirements.txt#L2
Welcome to dependency hell! :)
What are the consequences? Well, for cg it means that all tests are failing unless we take scout-browser away as a dependency.

After investigating this (https://medium.com/knerd/the-nine-circles-of-python-dependency-hell-481d53e3e025), a solution is that scout would upgrade to Flask-Dance at some point. Another is to speed up the uncoupling of cg and scout so you don't have to upgrade.

enhancement Intermediate

All 7 comments

I'd say that we should use this Flask-Dance in Scout as well, we don't want to stick to a library that is unmaintained, right? I'll start looking into Flask-Dance as soon as I have some time, but if you are at a good point with this uncoupling between cg and scout, go ahead!

Uncoupling of scout and cg has not even started yet ;)

The temporary solution to get cg to work again is to remove scout-browser as a dependency and install it separately before we install cg. Fixed here: https://github.com/Clinical-Genomics/servers/pull/55

Any progress here? Fixing this would also fix #1196

This is also important when considering other alternatives to handle login. We should spend some time on this one

I'm currently working on this and have had some progress lately. I think that https://authlib.org is the way to go.

Sounds good!

I'll start to have a look at this one today

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ielvers picture ielvers  路  3Comments

4WGH picture 4WGH  路  3Comments

1ctw picture 1ctw  路  5Comments

mhkc picture mhkc  路  3Comments

hassanfa picture hassanfa  路  3Comments