Skip to content

Commit 63131ec

Browse files
authored
Docs: default admin credentials (infiniflow#11260)
### What problem does this PR solve? ### Type of change - [x] Documentation Update
1 parent e8f1a24 commit 63131ec

4 files changed

Lines changed: 149 additions & 1 deletion

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Add data source",
3+
"position": 18,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Add various data sources"
7+
}
8+
}
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
---
2+
sidebar_position: 3
3+
slug: /add_google_drive
4+
---
5+
6+
# Add Google Drive
7+
8+
## 1. Create a Google Cloud Project
9+
10+
You can either create a dedicated project for RAGFlow or use an existing
11+
Google Cloud external project.
12+
13+
**Steps:**
14+
1. Open the project creation page\
15+
`https://console.cloud.google.com/projectcreate`
16+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image1.jpeg?raw=true)
17+
2. Select **External** as the Audience
18+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image2.png?raw=true)
19+
3. Click **Create**
20+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image3.jpeg?raw=true)
21+
22+
------------------------------------------------------------------------
23+
24+
## 2. Configure OAuth Consent Screen
25+
26+
1. Go to **APIs & Services → OAuth consent screen**
27+
2. Ensure **User Type = External**
28+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image4.jpeg?raw=true)
29+
3. Add your test users under **Test Users** by entering email addresses
30+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image5.jpeg?raw=true)
31+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image6.jpeg?raw=true)
32+
33+
------------------------------------------------------------------------
34+
35+
## 3. Create OAuth Client Credentials
36+
37+
1. Navigate to:\
38+
`https://console.cloud.google.com/auth/clients`
39+
2. Create a **Web Application**
40+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image7.png?raw=true)
41+
3. Enter a name for the client
42+
4. Add the following **Authorized Redirect URIs**:
43+
44+
```
45+
http://localhost:9380/v1/connector/google-drive/oauth/web/callback
46+
```
47+
48+
### If using Docker deployment:
49+
50+
**Authorized JavaScript origin:**
51+
```
52+
http://localhost:80
53+
```
54+
55+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image8.png?raw=true)
56+
### If running from source:
57+
**Authorized JavaScript origin:**
58+
```
59+
http://localhost:9222
60+
```
61+
62+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image9.png?raw=true)
63+
5. After saving, click **Download JSON**. This file will later be
64+
uploaded into RAGFlow.
65+
66+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image10.png?raw=true)
67+
68+
------------------------------------------------------------------------
69+
70+
## 4. Add Scopes
71+
72+
1. Open **Data Access → Add or remove scopes**
73+
74+
2. Paste and add the following entries:
75+
76+
```
77+
https://www.googleapis.com/auth/drive.readonly
78+
https://www.googleapis.com/auth/drive.metadata.readonly
79+
https://www.googleapis.com/auth/admin.directory.group.readonly
80+
https://www.googleapis.com/auth/admin.directory.user.readonly
81+
```
82+
83+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image11.jpeg?raw=true)
84+
3. Update and Save changes
85+
86+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image12.jpeg?raw=true)
87+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image13.jpeg?raw=true)
88+
89+
------------------------------------------------------------------------
90+
91+
## 5. Enable Required APIs
92+
Navigate to the Google API Library:\
93+
`https://console.cloud.google.com/apis/library`
94+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image14.png?raw=true)
95+
96+
Enable the following APIs:
97+
98+
- Google Drive API
99+
- Admin SDK API
100+
- Google Sheets API
101+
- Google Docs API
102+
103+
104+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image15.png?raw=true)
105+
106+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image16.png?raw=true)
107+
108+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image17.png?raw=true)
109+
110+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image18.png?raw=true)
111+
112+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image19.png?raw=true)
113+
114+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image21.png?raw=true)
115+
116+
------------------------------------------------------------------------
117+
118+
## 6. Add Google Drive As a Data Source in RAGFlow
119+
120+
1. Go to **Data Sources** inside RAGFlow
121+
2. Select **Google Drive**
122+
3. Upload the previously downloaded JSON credentials
123+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image22.jpeg?raw=true)
124+
4. Enter the shared Google Drive folder link (https://drive.google.com/drive), such as:
125+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image23.png?raw=true)
126+
127+
5. Click **Authorize with Google**
128+
A browser window will appear.
129+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image25.jpeg?raw=true)
130+
Click: - **Continue** - **Select All → Continue** - Authorization should
131+
succeed - Select **OK** to add the data source
132+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image26.jpeg?raw=true)
133+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image27.jpeg?raw=true)
134+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image28.png?raw=true)
135+
![placeholder-image](https://github.com/infiniflow/ragflow-docs/blob/040e4acd4c1eac6dc73dc44e934a6518de78d097/images/google_drive/image29.png?raw=true)
136+
137+

docs/guides/dataset/best_practices/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"label": "Best practices",
3-
"position": 11,
3+
"position": 19,
44
"link": {
55
"type": "generated-index",
66
"description": "Best practices on configuring a dataset."

docs/guides/manage_users_and_services.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ The Admin CLI and Admin Service form a client-server architectural suite for RAG
6464

6565
- -p: RAGFlow admin server port
6666

67+
## Default administrative account
6768

69+
- Username: admin@ragflow.io
70+
- Password: admin
6871

6972
## Supported Commands
7073

0 commit comments

Comments
 (0)