You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Open `app.yaml` and replace `<SERVICE_ACCOUNT>` with the email address of your App Engine
33
+
default service account (you can find this in the
34
+
[App Engine settings](https://console.cloud.google.com/appengine/settings) in Cloud Console).
36
35
37
-
3.**Deploy to App Engine:**
38
-
* Open `app.yaml` and replace `<SERVICE_ACCOUNT>` with the email address of your App Engine default service account (you can find this in the [App Engine settings](https://console.cloud.google.com/appengine/settings) in Cloud Console).
39
36
* Deploy the app:
37
+
40
38
```bash
41
39
gcloud app deploy
42
40
```
41
+
42
+
1. **Create and Use OAuth Client ID:**
43
+
43
44
* Get the app hostname:
45
+
44
46
```bash
45
47
gcloud app describe | grep defaultHostname
46
48
```
47
-
* Update `client_secrets.json`: Replace `http://localhost:8080/auth/callback`in`Authorized redirect URIs` with `<hostname from the previous step>/auth/callback`.
48
-
* Redeploy the app:
49
+
50
+
* In your Google Cloud project, go to [APIs & Services > Credentials](https://console.cloud.google.com/apis/credentials).
51
+
* Click `Create Credentials > OAuth client ID`.
52
+
* Select `Web application` as the application type.
53
+
* Add `<hostname from the previous step>/auth/callback` to `Authorized redirect URIs`.
54
+
* Download the JSON file and rename it to `client_secrets.json`in your project directory.
55
+
* Redeploy the app with the file `client_secrets.json`:
56
+
49
57
```bash
50
58
gcloud app deploy
51
59
```
52
60
53
-
4. **Grant Datastore Permissions:**
61
+
1. **Grant Datastore Permissions:**
62
+
54
63
* Grant the App Engine default service account permissions to access Datastore:
64
+
55
65
```bash
56
66
PROJECT_ID=$(gcloud config list --format='value(core.project)')
0 commit comments