@poly-x/core 0.1.0-alpha.13 → 0.1.0-alpha.15
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/dist/index.cjs +1 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.mjs +1 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1043,6 +1043,7 @@ var AuthClient = class {
|
|
|
1043
1043
|
const response = await this.transport.request({
|
|
1044
1044
|
method: "POST",
|
|
1045
1045
|
url: this.config.baseUrl + ENDPOINTS.token,
|
|
1046
|
+
...params.forwardedHeaders ? { headers: params.forwardedHeaders } : {},
|
|
1046
1047
|
body: {
|
|
1047
1048
|
grant_type: "authorization_code",
|
|
1048
1049
|
code: params.code,
|
package/dist/index.d.cts
CHANGED
|
@@ -557,6 +557,16 @@ interface ExchangeCodeParams {
|
|
|
557
557
|
code: string;
|
|
558
558
|
codeVerifier: string;
|
|
559
559
|
redirectUri: string;
|
|
560
|
+
/**
|
|
561
|
+
* Browser context to attach to the token exchange (the call that creates the
|
|
562
|
+
* session). In a BFF deployment this request originates from Node, so without
|
|
563
|
+
* these the platform records the server's user-agent/IP ("node"/Unknown) instead
|
|
564
|
+
* of the end user's device. The BFF forwards a curated allowlist of the browser's
|
|
565
|
+
* request headers (user-agent, accept-language, the sec-ch-ua* client hints, and
|
|
566
|
+
* the observed client IP as x-forwarded-for). Optional and additive — omitting it
|
|
567
|
+
* preserves the prior behavior.
|
|
568
|
+
*/
|
|
569
|
+
forwardedHeaders?: Record<string, string>;
|
|
560
570
|
}
|
|
561
571
|
interface SetPasswordParams {
|
|
562
572
|
userId: string;
|
package/dist/index.d.mts
CHANGED
|
@@ -557,6 +557,16 @@ interface ExchangeCodeParams {
|
|
|
557
557
|
code: string;
|
|
558
558
|
codeVerifier: string;
|
|
559
559
|
redirectUri: string;
|
|
560
|
+
/**
|
|
561
|
+
* Browser context to attach to the token exchange (the call that creates the
|
|
562
|
+
* session). In a BFF deployment this request originates from Node, so without
|
|
563
|
+
* these the platform records the server's user-agent/IP ("node"/Unknown) instead
|
|
564
|
+
* of the end user's device. The BFF forwards a curated allowlist of the browser's
|
|
565
|
+
* request headers (user-agent, accept-language, the sec-ch-ua* client hints, and
|
|
566
|
+
* the observed client IP as x-forwarded-for). Optional and additive — omitting it
|
|
567
|
+
* preserves the prior behavior.
|
|
568
|
+
*/
|
|
569
|
+
forwardedHeaders?: Record<string, string>;
|
|
560
570
|
}
|
|
561
571
|
interface SetPasswordParams {
|
|
562
572
|
userId: string;
|
package/dist/index.mjs
CHANGED
|
@@ -1042,6 +1042,7 @@ var AuthClient = class {
|
|
|
1042
1042
|
const response = await this.transport.request({
|
|
1043
1043
|
method: "POST",
|
|
1044
1044
|
url: this.config.baseUrl + ENDPOINTS.token,
|
|
1045
|
+
...params.forwardedHeaders ? { headers: params.forwardedHeaders } : {},
|
|
1045
1046
|
body: {
|
|
1046
1047
|
grant_type: "authorization_code",
|
|
1047
1048
|
code: params.code,
|