flask-dance
flask-dance copied to clipboard
Warning: Scope has changed from "repo user:email" to "repo,user:email".
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
Which version of Flask-Dance and oauthlib are you using? You should be able to see this with something like a pip freeze.
I'm using Flask-Dance==1.4.0
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.
@tnniras do you still need help with this?
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 .
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_SCOPEenvironment 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.