diff --git a/README.md b/README.md index 9cce4b3ba5c9165ce52e0aacb415e295adb954a5..1c26c803bc9dd380302dbcf9b9f8d56d2b975136 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ Some other options are more interesting: * `TEST_OAUTH_RESPECT_ID` (default False): If True, use the TEST Auth ID of a user as the identifying column in the Django app, otherwise use the username. + * `TEST_OAUTH_SCOPES` (default `['read_profile']`): Scope of the OAuth + requests. ### Verifiers diff --git a/test_oauth/views.py b/test_oauth/views.py index d8540e251ef86361ad9eb755b5bfa19a7eecdf77..adefb1947c77ef13847ffba67158914194f95584 100644 --- a/test_oauth/views.py +++ b/test_oauth/views.py @@ -9,7 +9,7 @@ from test_oauth.session import TESTOAuth2Session @never_cache def login(request, next=None): authorization_url, request.session['oauth_state'] = TESTOAuth2Session( - scope=['read_profile'], + scope=getattr(settings, 'TEST_OAUTH_SCOPES', ['read_profile']), ).authorization_url() return redirect(authorization_url)