Skip to content

Commit 8275fd4

Browse files
committed
chore: npm run serveStagingAccount impl
1 parent 68a2328 commit 8275fd4

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"_majorVersionBump": "gulp majorVersionBump",
7575
"serve": "node serve-proxy.js . -p 8000 -c-1",
7676
"serveLocalAccount": "node serve-proxy.js . -p 8000 -c-1 --localAccount",
77+
"serveStagingAccount": "node serve-proxy.js . -p 8000 -c-1 --stagingAccount",
7778
"_serveWithWebCacheHelp": "echo !!!Make sure to npm run release:dev/stageing/prod before testing the cache!!!",
7879
"serveWithWebCache": "npm run _releaseWebCache && npm run _serveWithWebCacheHelp && http-server ./dist -p 8000 -c-1",
7980
"serveExternal": "node serve-proxy.js . -p 8000 -a 0.0.0.0 --log-ip -c-1",

src/services/readme-login-browser-no_dist.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ For testing with a local account server instance:
100100

101101
1. **Configure Proxy Server:**
102102
- use `npm run serveLocalAccount` to serve phoenix repo server, instead of using npm run serve command.
103+
- use `npm run serveStagingAccount` to use the staging endpoint. To get access to staging server, contact team.
103104

104105
2. **Setup Local Account Server:**
105106
- Start your local account development stack on `localhost:5000`
@@ -109,10 +110,12 @@ Now just visit login server at `http://localhost:5000` and login. It should work
109110
at https://localhost:8000/src when you run phoenix code dev server via `npm run serve`. This works without any
110111
manual cookie copy needed as the dev server sets cookies localhost wide. But if that didnt work, please see
111112
manual cookie copy instructions below.
113+
114+
For staging server at https://account-stage.phcode.dev , you may need to copy cookie manually like below:
112115

113116
1. **Login and Copy Session:**
114-
- Navigate to `http://localhost:5000` in browser
115-
- Login with test credentials
117+
- Navigate to `http://localhost:5000` in browser. (if staging, use https://account-stage.phcode.dev)
118+
- Login with your credentials
116119
- Copy `session` cookie value from DevTools
117120

118121
2. **Set Cookie in Phoenix App:**

src/services/readme-login-desktop-no_dist.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -243,22 +243,19 @@ For testing desktop authentication with a local account server:
243243
244244
1. **Configure Proxy Server:**
245245
- use `npm run serveLocalAccount` to serve phoenix repo server, instead of using npm run serve command.
246+
- use `npm run serveStagingAccount` to use the staging endpoint. To get access to staging server, contact team.
246247
247-
2. **Rebuild Application:**
248-
```bash
249-
npm run build
250-
```
251-
252-
3. **Start Your Local Account Server:**
253-
- Ensure your local account server is running on the configured port (e.g., localhost:5000)
254-
- Verify all authentication endpoints are properly configured
248+
2. **Setup Local Account Server:**
249+
- Start your local account development stack on `localhost:5000`
250+
- Ensure all login endpoints are properly configured
255251
256-
4. **Test Desktop Authentication:**
257-
- Desktop app will now use your local server for all authentication calls
258-
- Verification codes and API key resolution will go through your local server
252+
3. **Test Desktop Authentication:**
253+
- Desktop app will now use your local/staging server for all authentication calls
254+
- Verification codes and API key resolution will go through your local/staging server
259255
- Auto-verification will attempt to connect to your local account service
260256
261-
**Note:** Unlike browser testing which requires proxy server configuration, desktop apps simply use the `account_url` directly from config.json.
257+
**Note:** Like browser testing which requires proxy server configuration, desktop apps also use the proxy server
258+
for communication with backend.
262259
263260
## Troubleshooting
264261

0 commit comments

Comments
 (0)