35
35
36
36
app.config['SECRET_KEY'] = 'your-secret-key'
37
37
38
- app.config['GOOGLE_OAUTH2_CLIENT_SECRETS_JSON '] = 'client_secrets.json'
38
+ app.config['GOOGLE_OAUTH2_CLIENT_SECRETS_FILE '] = 'client_secrets.json'
39
39
40
40
# or, specify the client id and secret separately
41
41
app.config['GOOGLE_OAUTH2_CLIENT_ID'] = 'your-client-id'
@@ -213,14 +213,14 @@ class UserOAuth2(object):
213
213
214
214
Configuration values:
215
215
216
- * ``GOOGLE_OAUTH2_CLIENT_SECRETS_JSON `` path to a client secrets json
216
+ * ``GOOGLE_OAUTH2_CLIENT_SECRETS_FILE `` path to a client secrets json
217
217
file, obtained from the credentials screen in the Google Developers
218
218
console.
219
219
* ``GOOGLE_OAUTH2_CLIENT_ID`` the oauth2 credentials' client ID. This
220
- is only needed if ``GOOGLE_OAUTH2_CLIENT_SECRETS_JSON `` is not
220
+ is only needed if ``GOOGLE_OAUTH2_CLIENT_SECRETS_FILE `` is not
221
221
specified.
222
222
* ``GOOGLE_OAUTH2_CLIENT_SECRET`` the oauth2 credentials' client
223
- secret. This is only needed if ``GOOGLE_OAUTH2_CLIENT_SECRETS_JSON ``
223
+ secret. This is only needed if ``GOOGLE_OAUTH2_CLIENT_SECRETS_FILE ``
224
224
is not specified.
225
225
226
226
If app is specified, all arguments will be passed along to init_app.
@@ -243,7 +243,7 @@ def init_app(self, app, scopes=None, client_secrets_file=None,
243
243
app: A Flask application.
244
244
scopes: Optional list of scopes to authorize.
245
245
client_secrets_file: Path to a file containing client secrets. You
246
- can also specify the GOOGLE_OAUTH2_CLIENT_SECRETS_JSON config
246
+ can also specify the GOOGLE_OAUTH2_CLIENT_SECRETS_FILE config
247
247
value.
248
248
client_id: If not specifying a client secrets file, specify the
249
249
OAuth2 client id. You can also specify the
@@ -307,8 +307,8 @@ def _load_config(self, client_secrets_file, client_id, client_secret):
307
307
except KeyError :
308
308
raise ValueError (
309
309
'OAuth2 configuration could not be found. Either specify the '
310
- 'client_secrets_file or client_id and client_secret or set the '
311
- 'app configuration variables '
310
+ 'client_secrets_file or client_id and client_secret or set '
311
+ 'the app configuration variables '
312
312
'GOOGLE_OAUTH2_CLIENT_SECRETS_FILE or '
313
313
'GOOGLE_OAUTH2_CLIENT_ID and GOOGLE_OAUTH2_CLIENT_SECRET.' )
314
314
0 commit comments