Skip to content

Commit 55ec6cf

Browse files
committed
refactor: rename proxy cli to tunnel
1 parent 5d652f7 commit 55ec6cf

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

docs/docs/references/using-cli/custom-ui-local-proxy.mdx renamed to docs/docs/references/using-cli/tunnel.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Tabs from '@theme/Tabs';
44

55
# Set up a local tunnel for custom UI development
66

7-
<Availability cloud oss={{ major: 1, minor: 19 }} />
7+
<Availability cloud oss={{ major: 1, minor: 20 }} />
88

99
For Logto Cloud users, We've made it easy to let you "Bring your own UI" to Logto. Cloud users can now upload a zip file containing the custom UI assets in Logto Console -> Sign-in experience -> Custom UI. (Check out the [Bring your UI](/docs/recipes/customize-sie/bring-your-ui) page for more details.)
1010

@@ -34,19 +34,19 @@ sequenceDiagram
3434
```
3535

3636
But now since you are developing your own custom sign-in UI, you need a way to navigate to the custom sign-in UI pages running on your local machine instead.
37-
This requires a local proxy to intercept the outgoing requests from your application and redirect them to your custom sign-in UI pages.
37+
This requires a local tunnel service to intercept the outgoing requests from your application and redirect them to your custom sign-in UI pages.
3838

3939
Additionally, you need to interact with Logto's experience API to authenticate users and manage sessions.
40-
This proxy will also help forward these experience API requests to Logto Cloud in order to avoid CORS issues.
40+
This service will also help forward these experience API requests to Logto Cloud in order to avoid CORS issues.
4141

42-
The sequence diagram below illustrates how a successful "sign-in" flow works with your custom UI and the proxy in place:
42+
The sequence diagram below illustrates how a successful "sign-in" flow works with your custom UI and the tunnel service in place:
4343

4444
```mermaid
4545
sequenceDiagram
4646
box Local machine
4747
participant A as Your application
4848
participant B as Your custom sign-in UI
49-
participant C as proxy
49+
participant C as Tunnel
5050
end
5151
box Logto Cloud
5252
participant D as Logto Cloud auth endpoint
@@ -63,7 +63,7 @@ sequenceDiagram
6363
A --> A: Handle the sign-in callback and<br/>the user is now authenticated
6464
```
6565

66-
With the proxy in place, you can now develop and test your custom sign-in UI locally, without needing to upload the assets to Logto Cloud every time you make a change.
66+
With the tunnel service in place, you can now develop and test your custom sign-in UI locally, without needing to upload the assets to Logto Cloud every time you make a change.
6767

6868
## Instructions
6969

@@ -78,14 +78,14 @@ Then you can execute the command this way:
7878
<TabItem value="cli" label="CLI">
7979

8080
```bash
81-
logto proxy -p 9000 --experience-uri http://localhost:4000/ --endpoint https://foobar.logto.app/
81+
logto tunnel -p 9000 --experience-uri http://localhost:4000/ --endpoint https://foobar.logto.app/
8282
```
8383

8484
</TabItem>
8585
<TabItem value="npx" label="npx">
8686

8787
```bash
88-
npx @logto/cli proxy -p 9000 --experience-uri http://localhost:4000/ --endpoint https://foobar.logto.app/
88+
npx @logto/cli tunnel -p 9000 --experience-uri http://localhost:4000/ --endpoint https://foobar.logto.app/
8989
```
9090

9191
</TabItem>
@@ -99,14 +99,14 @@ It also works if you have custom domain configured in Logto:
9999
<TabItem value="cli" label="CLI">
100100

101101
```bash
102-
logto proxy -p 9000 --experience-uri http://localhost:4000/ --endpoint https://your.custom.domain/
102+
logto tunnel -p 9000 --experience-uri http://localhost:4000/ --endpoint https://your.custom.domain/
103103
```
104104

105105
</TabItem>
106106
<TabItem value="npx" label="npx">
107107

108108
```bash
109-
npx @logto/cli proxy -p 9000 --experience-uri http://localhost:4000/ --endpoint https://your.custom.domain/
109+
npx @logto/cli tunnel -p 9000 --experience-uri http://localhost:4000/ --endpoint https://your.custom.domain/
110110
```
111111

112112
</TabItem>
@@ -120,14 +120,14 @@ Alternatively, the command also supports static html assets without needing to r
120120
<TabItem value="cli" label="CLI">
121121

122122
```bash
123-
logto proxy -p 9000 --experience-path /path/to/your/static/files --endpoint https://foobar.logto.app/
123+
logto tunnel -p 9000 --experience-path /path/to/your/static/files --endpoint https://foobar.logto.app/
124124
```
125125

126126
</TabItem>
127127
<TabItem value="npx" label="npx">
128128

129129
```bash
130-
npx @logto/cli proxy -p 9000 --experience-path /path/to/your/static/files --endpoint https://foobar.logto.app/
130+
npx @logto/cli tunnel -p 9000 --experience-path /path/to/your/static/files --endpoint https://foobar.logto.app/
131131
```
132132

133133
</TabItem>
@@ -136,7 +136,7 @@ npx @logto/cli proxy -p 9000 --experience-path /path/to/your/static/files --endp
136136

137137
### Step 2: Update endpoint URI in your application
138138

139-
Finally, run your application and set its Logto endpoint to the proxy address `http://localhost:9000/` instead.
139+
Finally, run your application and set its Logto endpoint to the tunnel service address `http://localhost:9000/` instead.
140140

141141
Let's take a React application as an example:
142142

@@ -145,7 +145,7 @@ import { LogtoProvider, LogtoConfig } from '@logto/react';
145145

146146
const config: LogtoConfig = {
147147
// endpoint: 'https://foobar.logto.app/', // original Logto Cloud endpoint
148-
endpoint: 'http://localhost:9000/', // proxy address
148+
endpoint: 'http://localhost:9000/', // tunnel service address
149149
appId: '<your-application-id>',
150150
};
151151

0 commit comments

Comments
 (0)