File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 5151# These scopes should match the scopes in your GCP project's OAuth Consent
5252# Screen: https://console.cloud.google.com/apis/credentials/consent
5353SCOPES = [
54+ "openid" ,
5455 "https://www.googleapis.com/auth/userinfo.profile" ,
55- "https://www.googleapis.com/auth/userinfo.email"
56+ "https://www.googleapis.com/auth/userinfo.email" ,
57+ "https://www.googleapis.com/auth/classroom.courses.readonly" ,
58+ "https://www.googleapis.com/auth/classroom.addons.teacher" ,
59+ "https://www.googleapis.com/auth/classroom.addons.student"
5660]
5761
5862
@@ -272,9 +276,6 @@ def credentials_to_dict(credentials):
272276
273277
274278if __name__ == "__main__" :
275- # Allow the OAuth flow to adjust scopes.
276- os .environ ["OAUTHLIB_RELAX_TOKEN_SCOPE" ] = "1"
277-
278279 # You have several options for running the web server.
279280
280281 ### OPTION 1: Unsecured localhost
Original file line number Diff line number Diff line change 5252# These scopes should match the scopes in your GCP project's OAuth Consent
5353# Screen: https://console.cloud.google.com/apis/credentials/consent
5454SCOPES = [
55+ "openid" ,
5556 "https://www.googleapis.com/auth/userinfo.profile" ,
56- "https://www.googleapis.com/auth/userinfo.email"
57+ "https://www.googleapis.com/auth/userinfo.email" ,
58+ "https://www.googleapis.com/auth/classroom.courses.readonly" ,
59+ "https://www.googleapis.com/auth/classroom.addons.teacher" ,
60+ "https://www.googleapis.com/auth/classroom.addons.student"
5761]
5862
5963# Point to a database file in the project root.
@@ -429,9 +433,6 @@ def save_user_credentials(credentials=None, user_info=None):
429433
430434
431435if __name__ == "__main__" :
432- # Allow the OAuth flow to adjust scopes.
433- os .environ ["OAUTHLIB_RELAX_TOKEN_SCOPE" ] = "1"
434-
435436 # You have several options for running the web server.
436437
437438 ### OPTION 1: Unsecured localhost
You can’t perform that action at this time.
0 commit comments