flask-dance icon indicating copy to clipboard operation
flask-dance copied to clipboard

Warning: Scope has changed from "repo user:email" to "repo,user:email".

Open tnniras opened this issue 6 years ago • 6 comments
trafficstars

Hi singingwolfboy,

I am using flask-dance to authenticate to GitHub. When I'm using permission scope while initiating github_blueprint as array :

github_blueprint = make_github_blueprint(client_id='myclientid',client_secret='myclientsecret', scope=["user:email", "repo"])

It throws Warning : Warning: Scope has changed from "repo user:email" to "repo,user:email".

I can use ["user:email"] or ["repo"] (only one at a time) though. When I started researching about the issue, found below details :

https://stackoverflow.com/questions/28011269/flask-dance-error-scope-has-changed

Please take a time and let me know how we can solve this issue. That would be really helpful.

Thanks, TUSHAR

tnniras avatar Mar 08 '19 16:03 tnniras

Which version of Flask-Dance and oauthlib are you using? You should be able to see this with something like a pip freeze.

daenney avatar Mar 08 '19 17:03 daenney

I'm using Flask-Dance==1.4.0

tnniras avatar Mar 08 '19 17:03 tnniras

You need to set the OAUTHLIB_RELAX_TOKEN_SCOPE environment variable.

Where would be a good place to document this? It's technically an oauthlib thing, not a Flask-Dance thing, but since Flask-Dance is built on top of oauthlib, we're still affected by it.

singingwolfboy avatar Mar 15 '19 08:03 singingwolfboy

@tnniras do you still need help with this?

singingwolfboy avatar Mar 21 '19 09:03 singingwolfboy

Hi Singingwolfboy,

I’m still trying to resolve this... oauthlib is really complicated. I’m still using Flask-Dance though. Single scope at a time ... but it would be great if it accepts ‘user’ and ‘repo’ scopes for github has array.

Tushar

On Thu, 21 Mar 2019 at 2:53 PM, David Baumgold [email protected] wrote:

@tnniras https://github.com/tnniras do you still need help with this?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/singingwolfboy/flask-dance/issues/235#issuecomment-475159486, or mute the thread https://github.com/notifications/unsubscribe-auth/ATZRyDg9H6PYOc93mG35vE48qg-e46W4ks5vY0-CgaJpZM4blokm .

tnniras avatar Mar 21 '19 09:03 tnniras

Hi @singingwolfboy ! It worked for me. Even on google_auth_oauthlib.flow.

`

os.environ['OAUTHLIB_RELAX_TOKEN_SCOPE'] = '1'

`

Tks!!!!

You need to set the OAUTHLIB_RELAX_TOKEN_SCOPE environment variable.

Where would be a good place to document this? It's technically an oauthlib thing, not a Flask-Dance thing, but since Flask-Dance is built on top of oauthlib, we're still affected by it.

PedroArSp avatar Apr 03 '20 15:04 PedroArSp