Skip to content

Commit f6e46dd

Browse files
committed
docs: document SFCC_REDIRECT_URI and SFCC_OAUTH_LOCAL_PORT env vars
Add proxy/redirect URI documentation to: - Configuration guide (env vars table) - Authentication guide (redirect URLs section) - b2c-config skill (authentication section)
1 parent 9ff39cb commit f6e46dd

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

docs/guide/authentication.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ For **User Authentication** (implicit flow), configure redirect URLs in your API
152152

153153
**Note:** Redirect URLs are not required for API clients using only Client Credentials authentication.
154154

155+
::: tip Running Behind a Proxy
156+
If you're running the CLI behind a proxy where `localhost:8080` isn't reachable by the browser, set `SFCC_REDIRECT_URI` to the proxy URL (e.g., `https://proxy.example.com:8080`). The proxy should forward traffic to the CLI's local server. You can also change the local server port with `SFCC_OAUTH_LOCAL_PORT`. Make sure to add your proxy URL to the API client's redirect URLs in Account Manager.
157+
:::
158+
155159
## OCAPI Configuration
156160

157161
For operations that interact with B2C Commerce instances (code deployment, jobs, sites), you need to configure OCAPI permissions on each instance.

docs/guide/configuration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ You can configure the CLI using environment variables:
7070
| `SFCC_SHORTCODE` | SCAPI short code |
7171
| `SFCC_TENANT_ID` | Organization/tenant ID for SCAPI |
7272
| `SFCC_ACCOUNT_MANAGER_HOST` | Account Manager hostname for OAuth |
73+
| `SFCC_REDIRECT_URI` | Override redirect URI for implicit OAuth flow (e.g., when behind a proxy) |
74+
| `SFCC_OAUTH_LOCAL_PORT` | Local port for the implicit OAuth redirect server (default: `8080`) |
7375
| `SFCC_USERNAME` | Basic auth username |
7476
| `SFCC_PASSWORD` | Basic auth password |
7577
| `SFCC_CERTIFICATE` | Path to PKCS12 certificate for two-factor auth (mTLS) |

skills/b2c-cli/skills/b2c-config/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ b2c auth token --user-auth
3535

3636
Coding agents can also use `--user-auth` — the browser flow works in any environment where a browser can be opened. The flag is exclusive with `--auth-methods`.
3737

38+
**Running behind a proxy:** If `localhost:8080` isn't reachable by the browser (e.g., running in a container or behind a reverse proxy), set `SFCC_REDIRECT_URI` to the proxy URL. The local OAuth server still listens on the default port (or `SFCC_OAUTH_LOCAL_PORT`), but the redirect URI sent to Account Manager will use your proxy URL. Add the proxy URL to the API client's redirect URLs in Account Manager.
39+
3840
## Tenant ID and Organization ID
3941

4042
B2C Commerce uses two related identifiers:

0 commit comments

Comments
 (0)