Skip to content

Commit 237e5d1

Browse files
Merge pull request googleapis#324 from waprin/master
Correct flask_util environment variable docs.
2 parents 55c2bcc + 2b6aea6 commit 237e5d1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

oauth2client/flask_util.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@
3535
3636
app.config['SECRET_KEY'] = 'your-secret-key'
3737
38-
app.config['OAUTH2_CLIENT_SECRETS_JSON'] = 'client_secrets.json'
38+
app.config['GOOGLE_OAUTH2_CLIENT_SECRETS_JSON'] = 'client_secrets.json'
39+
3940
# or, specify the client id and secret separately
40-
app.config['OAUTH2_CLIENT_ID'] = 'your-client-id'
41-
app.config['OAUTH2_CLIENT_SECRET'] = 'your-client-secret'
41+
app.config['GOOGLE_OAUTH2_CLIENT_ID'] = 'your-client-id'
42+
app.config['GOOGLE_OAUTH2_CLIENT_SECRET'] = 'your-client-secret'
4243
4344
oauth2 = UserOAuth2(app)
4445
@@ -202,9 +203,9 @@ class UserOAuth2(object):
202203
file, obtained from the credentials screen in the Google Developers
203204
console.
204205
* ``GOOGLE_OAUTH2_CLIENT_ID`` the oauth2 credentials' client ID. This
205-
is only needed if ``OAUTH2_CLIENT_SECRETS_JSON`` is not specified.
206+
is only needed if ``GOOGLE_OAUTH2_CLIENT_SECRETS_JSON`` is not specified.
206207
* ``GOOGLE_OAUTH2_CLIENT_SECRET`` the oauth2 credentials' client
207-
secret. This is only needed if ``OAUTH2_CLIENT_SECRETS_JSON`` is not
208+
secret. This is only needed if ``GOOGLE_OAUTH2_CLIENT_SECRETS_JSON`` is not
208209
specified.
209210
210211
If app is specified, all arguments will be passed along to init_app.
@@ -227,7 +228,7 @@ def init_app(self, app, scopes=None, client_secrets_file=None,
227228
app: A Flask application.
228229
scopes: Optional list of scopes to authorize.
229230
client_secrets_file: Path to a file containing client secrets. You
230-
can also specify the OAUTH2_CLIENT_SECRETS_JSON config value.
231+
can also specify the GOOGLE_OAUTH2_CLIENT_SECRETS_JSON config value.
231232
client_id: If not specifying a client secrets file, specify the
232233
OAuth2 client id. You can also specify the
233234
GOOGLE_OAUTH2_CLIENT_ID config value. You must also provide a

0 commit comments

Comments
 (0)