Skip to content

Commit f5c2ea4

Browse files
committed
maybe working?
1 parent d4b65da commit f5c2ea4

File tree

5 files changed

+49
-52
lines changed

5 files changed

+49
-52
lines changed

.flaskenv

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ FLASK_APP=main.py
22
FLASK_ENV=development
33
FLASK_RUN_HOST=localhost
44
FLASK_RUN_PORT=8080
5-
GLOWSCRIPT_RUNNING_LOCALLY=true
6-
DATASTORE_EMULATOR_HOST=localhost:8081
5+
GLOWSCRIPT_RUNNING_LOCALLY=false
6+
#DATASTORE_EMULATOR_HOST=localhost:8081
77
CLIENT_SECRET_VERSION=1

app.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
runtime: python38
1+
runtime: python310
22

33
handlers:
44

ide/auth.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def get_base_url():
8989
"""
9090
Get the base_url from the datastore
9191
"""
92-
return getSetting('auth_base_url')
92+
return getSetting('auth_base_url', default='http://localhost:8080')
9393
#
9494
# Robust way to check for running locally. Also easy to modify.
9595
#
@@ -121,7 +121,7 @@ def fillCache(self):
121121
from google.cloud import secretmanager
122122
secrets = secretmanager.SecretManagerServiceClient()
123123
secret_path = f"projects/{GOOGLE_PROJECT_ID}/secrets/OAUTH_CLIENT_SECRETS/versions/{CLIENT_SECRET_VERSION}"
124-
theSecret = secrets.access_secret_version(secret_path).payload.data.decode("utf-8")
124+
theSecret = secrets.access_secret_version(name=secret_path).payload.data.decode("utf-8")
125125
client_secrets = json.loads(theSecret)
126126
CLIENT_ID = client_secrets.get("FN_CLIENT_ID")
127127
CLIENT_SECRET = client_secrets.get("FN_CLIENT_SECRET")
@@ -217,7 +217,7 @@ def auth():
217217

218218
oauth = authNamespace.get('oauth') or fillAuthNamespace()
219219
token = oauth.google.authorize_access_token()
220-
user = oauth.google.parse_id_token(token)
220+
user = token['userinfo']
221221

222222
if check_auth_host_for_preview(auth_host): # are we in a preview version?
223223
if user.get('email') not in get_preview_users(): # only finish login for these guys

ide/routes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def lib_static(filename):
183183
cache_timeout = None
184184
if is_running_locally():
185185
cache_timeout=0
186-
return flask.send_from_directory('../lib', filename, cache_timeout=cache_timeout)
186+
return flask.send_from_directory('../lib', filename, max_age=cache_timeout)
187187

188188
@app.route('/package/<path:filename>')
189189
def package_static(filename):

requirements.txt

+42-45
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,43 @@
1-
astroid==2.4.2
2-
Authlib==0.15.2
3-
cachetools==4.1.1
4-
certifi==2022.12.07
5-
cffi==1.14.1
6-
chardet==3.0.4
7-
click==7.1.2
8-
cryptography==39.0.1
1+
async-timeout==4.0.2
2+
Authlib==1.2.0
3+
blinker==1.6.2
4+
cachetools==5.3.0
5+
certifi==2023.5.7
6+
cffi==1.15.1
7+
charset-normalizer==3.1.0
8+
click==8.1.3
9+
cryptography==40.0.2
910
Flask==2.3.2
10-
google-api-core==1.22.0
11-
google-api-python-client==1.10.0
12-
google-auth==1.20.0
13-
google-auth-httplib2==0.0.4
14-
google-cloud-core==1.5.0
15-
google-cloud-datastore==1.13.2
16-
google-cloud-logging==2.0.2
17-
google-cloud-ndb==1.4.2
18-
google-cloud-secret-manager==1.0.0
19-
googleapis-common-protos==1.52.0
20-
grpc-google-iam-v1==0.12.3
21-
grpcio==1.30.0
22-
httplib2==0.19.0
23-
idna==2.10
24-
isort==4.3.21
25-
itsdangerous==1.1.0
26-
Jinja2==2.11.3
27-
lazy-object-proxy==1.4.3
28-
MarkupSafe==1.1.1
29-
mccabe==0.6.1
30-
proto-plus==1.13.0
31-
protobuf==3.20.2
32-
pyasn1==0.4.8
33-
pyasn1-modules==0.2.8
34-
pycparser==2.20
35-
pylint==2.5.3
36-
python-dotenv==0.14.0
37-
pytz==2020.1
38-
redis==3.5.3
39-
requests==2.25.1
40-
rsa==4.7
41-
six==1.15.0
42-
toml==0.10.1
43-
uritemplate==3.0.1
44-
urllib3==1.26.5
45-
Werkzeug==1.0.1
46-
wrapt==1.12.1
11+
google-api-core==2.11.0
12+
google-api-python-client==2.86.0
13+
google-auth==2.18.0
14+
google-auth-httplib2==0.1.0
15+
google-cloud-core==2.3.2
16+
google-cloud-datastore==2.15.2
17+
google-cloud-ndb==2.1.1
18+
google-cloud-secret-manager==2.16.1
19+
googleapis-common-protos==1.59.0
20+
grpc-google-iam-v1==0.12.6
21+
grpcio==1.54.2
22+
grpcio-status==1.54.2
23+
httplib2==0.22.0
24+
idna==3.4
25+
itsdangerous==2.1.2
26+
Jinja2==3.1.2
27+
MarkupSafe==2.1.2
28+
proto-plus==1.22.2
29+
protobuf==4.23.0
30+
pyasn1==0.5.0
31+
pyasn1-modules==0.3.0
32+
pycparser==2.21
33+
pymemcache==4.0.0
34+
pyparsing==3.0.9
35+
python-dotenv==1.0.0
36+
pytz==2023.3
37+
redis==4.5.5
38+
requests==2.30.0
39+
rsa==4.9
40+
six==1.16.0
41+
uritemplate==4.1.1
42+
urllib3==1.26.15
43+
Werkzeug==2.3.4

0 commit comments

Comments
 (0)