From 2110463858724072b9b8d3a51823662d02dd8e21 Mon Sep 17 00:00:00 2001 From: jefer94 Date: Fri, 13 Sep 2024 20:24:47 -0500 Subject: [PATCH] changes in scope --- breathecode/authenticate/views.py | 2 +- breathecode/services/google_meet/google_meet.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/breathecode/authenticate/views.py b/breathecode/authenticate/views.py index 24f4e82de..4eb3015d6 100644 --- a/breathecode/authenticate/views.py +++ b/breathecode/authenticate/views.py @@ -2027,7 +2027,7 @@ def get_google_token(request, token=None): "client_id": os.getenv("GOOGLE_CLIENT_ID", ""), "redirect_uri": os.getenv("GOOGLE_REDIRECT_URL", ""), "access_type": "offline", # we need offline access to receive refresh token and avoid total expiration - "scope": "https://www.googleapis.com/auth/calendar.events", + "scope": "calendar.events,meetings.space.readonly,meetings.space.created,drive.readonly ", "state": f"token={token.key}&url={url}", } diff --git a/breathecode/services/google_meet/google_meet.py b/breathecode/services/google_meet/google_meet.py index ecee31f04..e646d3e82 100644 --- a/breathecode/services/google_meet/google_meet.py +++ b/breathecode/services/google_meet/google_meet.py @@ -85,7 +85,12 @@ class ListParticipantsRequest(TypedDict): # Scopes for Google Calendar API (used for creating Google Meet links) -SCOPES = ["https://www.googleapis.com/auth/calendar"] +# https://www.googleapis.com/auth/meetings.space.created +# https://www.googleapis.com/auth/meetings.space.readonly +# SCOPES = [ +# "google.apps.meet.v2.SpacesService.CreateSpace", +# "google.apps.meet.v2.SpacesService.GetSpace", +# ] TOKEN_FILE_NAME = "google_cloud_oauth_token.pickle" GOOGLE_CLIENT_SECRET = "client_secret.json"