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
Copy file name to clipboardExpand all lines: README.md
+49-3Lines changed: 49 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,9 +32,39 @@ This utility works by changing the flow above as follows using a client-server p
32
32
33
33
This helper is written in Typescript and compiles down to two Javascript scripts, one for the server and one for the client.
34
34
35
-
### Download
35
+
### Option 1: Install via npm (Recommended)
36
36
37
-
Download the latest release from this repo. The release consists of a filed named `oauth2-forwarder.zip` which contains two Javascript scripts: `o2f-server.js` and `o2f-client.js` plus a helper `browser.sh` script, all in a directory called `o2f`. These can be placed wherever you want, but these instructions assume they are placed in the home directories of the host and container.
37
+
You can install oauth2-forwarder globally via npm:
38
+
39
+
```bash
40
+
npm install -g oauth2-forwarder
41
+
```
42
+
43
+
After installation, you'll have the following commands available globally:
44
+
-`o2f-server` - Run on the host machine
45
+
-`o2f-client` - Run on the container
46
+
-`o2f-browser` - Browser script for the container
47
+
48
+
#### On the host
49
+
50
+
Run `o2f-server` on the host machine. This will start the server and display the port it's listening on.
51
+
52
+
#### In the container
53
+
54
+
1. Set the server info environment variable based on the output from the host:
where PORT is the port displayed when you ran `o2f-server`.
59
+
60
+
2. Set the BROWSER environment variable to use the browser script:
61
+
```bash
62
+
export BROWSER=o2f-browser
63
+
```
64
+
65
+
### Option 2: Download Manually
66
+
67
+
Download the latest release from this repo. The release consists of a file named `oauth2-forwarder.zip` which contains two Javascript scripts: `o2f-server.js` and `o2f-client.js` plus a helper `browser.sh` script, all in a directory called `o2f`. These can be placed wherever you want, but these instructions assume they are placed in the home directories of the host and container.
38
68
39
69
### On the host
40
70
@@ -62,9 +92,25 @@ Notes:
62
92
63
93
Here's a strategy to make this fairly easy to use with a Docker container built with a Dockerfile.
64
94
95
+
#### Option 1: Using npm (Recommended)
96
+
97
+
On the host, set a specific port that you will listen on by configuring the env variable `OAUTH2_FORWARDER_PORT`.
0 commit comments