conwetlab / ckanext-oauth2

OAuth2 support for CKAN
GNU Affero General Public License v3.0
25 stars 56 forks source link

CKAN OAuth2 login: Scope has changed from "profile other.scope" to "all_info" #10

Closed emepetres closed 7 years ago

emepetres commented 7 years ago

After installing CKAN with ckanext-oauth2 plugin (fiware-migration branch), run with "paster serve" command (development) and try to log in, I'm getting the following error after redirect again to CKAN:

Scope has changed from "profile other.scope" to "all_info"

This is the relevant configuration part of development.ini:

## OAuth2 configuration
ckan.oauth2.logout_url = /user/logged_out
ckan.oauth2.register_url = https://account.lab.fiware.org/users/sign_up
ckan.oauth2.reset_url = https://account.lab.fiware.org/users/password/new
ckan.oauth2.edit_url = https://account.lab.fiware.org/settings
ckan.oauth2.authorization_endpoint = https://account.lab.fiware.org/oauth2/authorize
ckan.oauth2.token_endpoint = https://account.lab.fiware.org/oauth2/token
ckan.oauth2.profile_api_url = https://account.lab.fiware.org/user
ckan.oauth2.client_id = ******************************
ckan.oauth2.client_secret = *****************************
ckan.oauth2.scope = profile other.scope
ckan.oauth2.rememberer_name = auth_tkt
ckan.oauth2.profile_api_user_field = id
ckan.oauth2.profile_api_fullname_field = displayName
ckan.oauth2.profile_api_mail_field = email
ckan.oauth2.authorization_header = Bearer

And this is how I'm starting ckan:

export OAUTHLIB_INSECURE_TRANSPORT=True
cd /usr/lib/ckan/default/src/ckan
paster serve /etc/ckan/default/development.ini
aitormagan commented 7 years ago

The configuration file is not correct. You have to change the value of the property ckan.oauth2.scope and set it to all_info, as stated in the exception you are getting.

Try this solution and let me know if the issue is solved :)

BR Aitor