35
35
36
36
app.config['SECRET_KEY'] = 'your-secret-key'
37
37
38
- app.config['OAUTH2_CLIENT_SECRETS_JSON'] = 'client_secrets.json'
38
+ app.config['GOOGLE_OAUTH2_CLIENT_SECRETS_JSON'] = 'client_secrets.json'
39
+
39
40
# 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'
42
43
43
44
oauth2 = UserOAuth2(app)
44
45
@@ -202,9 +203,9 @@ class UserOAuth2(object):
202
203
file, obtained from the credentials screen in the Google Developers
203
204
console.
204
205
* ``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.
206
207
* ``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
208
209
specified.
209
210
210
211
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,
227
228
app: A Flask application.
228
229
scopes: Optional list of scopes to authorize.
229
230
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.
231
232
client_id: If not specifying a client secrets file, specify the
232
233
OAuth2 client id. You can also specify the
233
234
GOOGLE_OAUTH2_CLIENT_ID config value. You must also provide a
0 commit comments