From 2b6aea62894bc79eaf70670bcdac35bf7c474539 Mon Sep 17 00:00:00 2001 From: Bill Prin Date: Mon, 12 Oct 2015 23:54:17 -0700 Subject: [PATCH] Correct flask_util environment variable docs Previously some of the references to the flask_util configuration environment variables were missing the GOOGLE_ prefix. --- oauth2client/flask_util.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/oauth2client/flask_util.py b/oauth2client/flask_util.py index 2c455ac..02abcde 100644 --- a/oauth2client/flask_util.py +++ b/oauth2client/flask_util.py @@ -35,10 +35,11 @@ apiui/credential>`__. app.config['SECRET_KEY'] = 'your-secret-key' - app.config['OAUTH2_CLIENT_SECRETS_JSON'] = 'client_secrets.json' + app.config['GOOGLE_OAUTH2_CLIENT_SECRETS_JSON'] = 'client_secrets.json' + # or, specify the client id and secret separately - app.config['OAUTH2_CLIENT_ID'] = 'your-client-id' - app.config['OAUTH2_CLIENT_SECRET'] = 'your-client-secret' + app.config['GOOGLE_OAUTH2_CLIENT_ID'] = 'your-client-id' + app.config['GOOGLE_OAUTH2_CLIENT_SECRET'] = 'your-client-secret' oauth2 = UserOAuth2(app) @@ -202,9 +203,9 @@ class UserOAuth2(object): file, obtained from the credentials screen in the Google Developers console. * ``GOOGLE_OAUTH2_CLIENT_ID`` the oauth2 credentials' client ID. This - is only needed if ``OAUTH2_CLIENT_SECRETS_JSON`` is not specified. + is only needed if ``GOOGLE_OAUTH2_CLIENT_SECRETS_JSON`` is not specified. * ``GOOGLE_OAUTH2_CLIENT_SECRET`` the oauth2 credentials' client - secret. This is only needed if ``OAUTH2_CLIENT_SECRETS_JSON`` is not + secret. This is only needed if ``GOOGLE_OAUTH2_CLIENT_SECRETS_JSON`` is not specified. If app is specified, all arguments will be passed along to init_app. @@ -227,7 +228,7 @@ class UserOAuth2(object): app: A Flask application. scopes: Optional list of scopes to authorize. client_secrets_file: Path to a file containing client secrets. You - can also specify the OAUTH2_CLIENT_SECRETS_JSON config value. + can also specify the GOOGLE_OAUTH2_CLIENT_SECRETS_JSON config value. client_id: If not specifying a client secrets file, specify the OAuth2 client id. You can also specify the GOOGLE_OAUTH2_CLIENT_ID config value. You must also provide a