@seamless-auth/express 0.0.2-beta.10 → 0.0.2-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -8
- package/dist/index.js +2 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,14 +110,17 @@ This keeps trust boundaries clean and auditable.
|
|
|
110
110
|
|
|
111
111
|
## Environment Variables
|
|
112
112
|
|
|
113
|
-
| Variable | Description | Example
|
|
114
|
-
| -------------------- | ----------------------------------------- |
|
|
115
|
-
| `AUTH_SERVER_URL` | Base URL of your Seamless Auth Server | `https://auth.client.com`
|
|
116
|
-
| `COOKIE_SIGNING_KEY` | Secret for signing API session cookies | `local-dev-secret`
|
|
117
|
-
| `API_SERVICE_TOKEN` | API → Auth Server service secret | `shared-m2m-value`
|
|
118
|
-
| `APP_ORIGIN` | Your site URL (or localhost in demo mode) | `https://myapp.com`
|
|
119
|
-
| `
|
|
120
|
-
| `
|
|
113
|
+
| Variable | Description | Example |
|
|
114
|
+
| -------------------- | ----------------------------------------- | ------------------------- |
|
|
115
|
+
| `AUTH_SERVER_URL` | Base URL of your Seamless Auth Server | `https://auth.client.com` |
|
|
116
|
+
| `COOKIE_SIGNING_KEY` | Secret for signing API session cookies | `local-dev-secret` |
|
|
117
|
+
| `API_SERVICE_TOKEN` | API → Auth Server service secret | `shared-m2m-value` |
|
|
118
|
+
| `APP_ORIGIN` | Your site URL (or localhost in demo mode) | `https://myapp.com` |
|
|
119
|
+
| `DB_HOST` | Database Host | `localhost` |
|
|
120
|
+
| `DB_PORT` | Database Port | `5432` |
|
|
121
|
+
| `DB_USER` | Database user | `myuser` |
|
|
122
|
+
| `DB_PASSWORD` | Database password | `mypassword` |
|
|
123
|
+
| `DB_NAME` | Name of your database | `seamless` |
|
|
121
124
|
|
|
122
125
|
---
|
|
123
126
|
|
package/dist/index.js
CHANGED
|
@@ -342,13 +342,10 @@ function createSeamlessAuthServer(opts) {
|
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
344
344
|
const authorization = buildServiceAuthorization(req);
|
|
345
|
+
const options = method == "GET" ? { method, authorization } : { method, authorization, body: req.body };
|
|
345
346
|
const upstream = await authFetch(
|
|
346
347
|
`${resolvedOpts.authServerUrl}/${path}`,
|
|
347
|
-
|
|
348
|
-
method,
|
|
349
|
-
body: req.body,
|
|
350
|
-
authorization
|
|
351
|
-
}
|
|
348
|
+
options
|
|
352
349
|
);
|
|
353
350
|
const data = await upstream.json();
|
|
354
351
|
res.status(upstream.status).json(data);
|