File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
appengine/standard/firebase/firenotes/backend Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import logging
16
+ import os
16
17
17
18
from flask import Flask , jsonify , request
18
19
import flask_cors
@@ -72,7 +73,7 @@ def list_notes():
72
73
# [START gae_python_verify_token]
73
74
id_token = request .headers ['Authorization' ].split (' ' ).pop ()
74
75
claims = google .oauth2 .id_token .verify_firebase_token (
75
- id_token , HTTP_REQUEST )
76
+ id_token , HTTP_REQUEST , audience = os . environ . get ( 'GOOGLE_CLOUD_PROJECT' ) )
76
77
if not claims :
77
78
return 'Unauthorized' , 401
78
79
# [END gae_python_verify_token]
@@ -95,7 +96,7 @@ def add_note():
95
96
# Verify Firebase auth.
96
97
id_token = request .headers ['Authorization' ].split (' ' ).pop ()
97
98
claims = google .oauth2 .id_token .verify_firebase_token (
98
- id_token , HTTP_REQUEST )
99
+ id_token , HTTP_REQUEST , audience = os . environ . get ( 'GOOGLE_CLOUD_PROJECT' ) )
99
100
if not claims :
100
101
return 'Unauthorized' , 401
101
102
You can’t perform that action at this time.
0 commit comments