Skip to content

Commit e6c3327

Browse files
Tom GotsmanTom Gotsman
authored andcommitted
google auth docs
1 parent e68ca46 commit e6c3327

File tree

5 files changed

+59
-16
lines changed

5 files changed

+59
-16
lines changed
11.8 KB
Loading
17.1 KB
Loading
53.2 KB
Loading
31.8 KB
Loading

docs/ai_builder/integrations/google_auth.md

Lines changed: 59 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,69 @@ import reflex as rx
1212
from reflex_image_zoom import image_zoom
1313
```
1414

15+
16+
## Step 1: Create a Google OAuth Client
17+
18+
1 - Go to the [Google Cloud Console](https://console.cloud.google.com/)
19+
20+
2 - Navigate to **APIs & Services → Credentials**
21+
22+
3 - Click **Create Credentials**
23+
24+
1525
```python eval
1626
rx.el.div(
1727
image_zoom(
1828
rx.image(
19-
src=rx.color_mode_cond(
20-
"/ai_builder/integrations/google_light.webp",
21-
"/ai_builder/integrations/google_dark.webp",
22-
),
29+
src="/ai_builder/integrations/google_auth_1.webp",
30+
class_name="p-2 rounded-md h-auto",
31+
border=f"0.81px solid {rx.color('slate', 5)}",
32+
),
33+
class_name="rounded-md overflow-hidden",
34+
),
35+
class_name="w-full flex flex-col rounded-md cursor-pointer",
36+
)
37+
```
38+
39+
4 - Choose **OAuth client ID**.
40+
41+
```python eval
42+
rx.el.div(
43+
image_zoom(
44+
rx.image(
45+
src="/ai_builder/integrations/google_auth_2.webp",
46+
class_name="p-2 rounded-md h-auto",
47+
border=f"0.81px solid {rx.color('slate', 5)}",
48+
),
49+
class_name="rounded-md overflow-hidden",
50+
),
51+
class_name="w-full flex flex-col rounded-md cursor-pointer",
52+
)
53+
```
54+
55+
5 - Choose **Web Application** as the application type, name the application and enter your sandbox URL, which you get from the Google Auth integration panel, as the **Authorized JavaScript Origin** and **Authorized Redirect URIs**.
56+
57+
```python eval
58+
rx.el.div(
59+
image_zoom(
60+
rx.image(
61+
src="/ai_builder/integrations/google_auth_3.webp",
62+
class_name="p-2 rounded-md h-auto",
63+
border=f"0.81px solid {rx.color('slate', 5)}",
64+
),
65+
class_name="rounded-md overflow-hidden",
66+
),
67+
class_name="w-full flex flex-col rounded-md cursor-pointer",
68+
)
69+
```
70+
71+
6 - Copy the generated **Client ID** (`GOOGLE_CLIENT_ID`) and **Client Secret** (`GOOGLE_CLIENT_SECRET`).
72+
73+
```python eval
74+
rx.el.div(
75+
image_zoom(
76+
rx.image(
77+
src="/ai_builder/integrations/google_auth_4.webp",
2378
class_name="p-2 rounded-md h-auto",
2479
border=f"0.81px solid {rx.color('slate', 5)}",
2580
),
@@ -29,19 +84,7 @@ rx.el.div(
2984
)
3085
```
3186

32-
## Step 1: Create a Google OAuth Client
3387

34-
1. Go to the [Google Cloud Console](https://console.cloud.google.com/).
35-
2. Navigate to **APIs & Services → Credentials**.
36-
3. Click **Create Credentials → OAuth Client ID**.
37-
4. Select **Web Application** as the application type.
38-
5. Add the following **Authorized JavaScript Origin**:
39-
- https://3a992b51-c34a-405a-b90c-4b3320eb3b6a.fly.dev
40-
- The URL can be copied directly from the Google Auth integration panel.
41-
6. Set your authorized redirect URIs to match your app environment.
42-
7. Save the client and copy the following credentials:
43-
- **Client ID**: `YOUR_GOOGLE_CLIENT_ID`
44-
- **Client Secret**: `YOUR_GOOGLE_CLIENT_SECRET`
4588

4689
## Step 2: Configure the Integration in Your App
4790

0 commit comments

Comments
 (0)