@passflow/core 0.42.0 → 0.42.1
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 +17 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -13
- package/dist/index.d.ts +19 -13
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -4567,18 +4567,20 @@ export type LogOutOptions = {
|
|
|
4567
4567
|
* ended. It must match one of the app's registered redirect URLs; an unmatched one leaves the
|
|
4568
4568
|
* user on the Passflow server's start page. Default: the address the hosted sign-in landed on.
|
|
4569
4569
|
*
|
|
4570
|
-
*
|
|
4571
|
-
*
|
|
4572
|
-
*
|
|
4573
|
-
*
|
|
4574
|
-
*
|
|
4570
|
+
* It is also sent as `post_logout_redirect_uri` in the logout request. After a hosted sign-in
|
|
4571
|
+
* the request carries the address by default too, the same one the `/oidc/end_session` visit
|
|
4572
|
+
* uses. For a session from a SAML connection the server then returns the browser there after
|
|
4573
|
+
* the identity provider's single logout, instead of its own signed-out page. The server
|
|
4574
|
+
* ignores an address that is not a registered redirect URL. Needs Passflow server v0.137.1 or
|
|
4575
|
+
* later; older servers ignore it.
|
|
4575
4576
|
*/
|
|
4576
4577
|
postLogoutRedirectUri?: string;
|
|
4577
4578
|
/**
|
|
4578
4579
|
* When the logout answer carries `saml_logout_url` (a session from a SAML connection with
|
|
4579
4580
|
* SP-initiated logout), send the browser there after the local sign-out, so the identity
|
|
4580
|
-
* provider ends its session too. Default false: the URL is only returned.
|
|
4581
|
-
* `/oidc/end_session
|
|
4581
|
+
* provider ends its session too. Default false: the URL is only returned. After a hosted
|
|
4582
|
+
* sign-in the page goes there instead of `/oidc/end_session`: the session already ended at the
|
|
4583
|
+
* logout request, so `/oidc/end_session` could no longer reach the identity provider.
|
|
4582
4584
|
*/
|
|
4583
4585
|
followSamlLogout?: boolean;
|
|
4584
4586
|
};
|
|
@@ -4813,7 +4815,8 @@ export declare class AuthService {
|
|
|
4813
4815
|
*
|
|
4814
4816
|
* Emits no `SignOut`: `Passflow.logOut()` emits exactly one, after this resolves.
|
|
4815
4817
|
*
|
|
4816
|
-
* @param postLogoutRedirectUri - sent as `post_logout_redirect_uri` in the logout request
|
|
4818
|
+
* @param postLogoutRedirectUri - sent as `post_logout_redirect_uri` in the logout request. After a
|
|
4819
|
+
* hosted sign-in the address the hosted sign-in landed on is sent when this is not set
|
|
4817
4820
|
* @returns the `sub` of the session that ended, when known, and the SAML identity provider's
|
|
4818
4821
|
* logout address when the logout answer carried one
|
|
4819
4822
|
*/
|
|
@@ -7139,13 +7142,16 @@ export declare class Passflow {
|
|
|
7139
7142
|
* A session from a SAML connection with SP-initiated logout also has a session at the identity
|
|
7140
7143
|
* provider. The server then answers with its logout address, returned as `samlLogoutUrl` after
|
|
7141
7144
|
* the local session is cleared. With `followSamlLogout: true` the page goes there after the one
|
|
7142
|
-
* `SignOut
|
|
7143
|
-
*
|
|
7145
|
+
* `SignOut`, instead of `/oidc/end_session`: the session already ended at the logout request,
|
|
7146
|
+
* so the `/oidc/end_session` visit could no longer send the identity provider a LogoutRequest.
|
|
7147
|
+
* Without the option, or without a `samlLogoutUrl`, a hosted sign-in still goes to
|
|
7148
|
+
* `/oidc/end_session`.
|
|
7144
7149
|
*
|
|
7145
7150
|
* @param options.postLogoutRedirectUri - where to return after a hosted sign-out; must match one
|
|
7146
|
-
* of the app's registered redirect URLs.
|
|
7147
|
-
*
|
|
7148
|
-
*
|
|
7151
|
+
* of the app's registered redirect URLs. It is also sent in the logout request, and after a SAML
|
|
7152
|
+
* single logout the server returns the browser there (Passflow server v0.137.1 or later; older
|
|
7153
|
+
* servers ignore it). After a hosted sign-in the logout request carries the same return address
|
|
7154
|
+
* the `/oidc/end_session` visit uses: this one, else the address the hosted sign-in landed on
|
|
7149
7155
|
* @param options.followSamlLogout - navigate to the SAML identity provider's logout address when
|
|
7150
7156
|
* the server returns one
|
|
7151
7157
|
* @returns `{ samlLogoutUrl }` when the server returned the identity provider's logout address,
|
package/dist/index.d.ts
CHANGED
|
@@ -4567,18 +4567,20 @@ export type LogOutOptions = {
|
|
|
4567
4567
|
* ended. It must match one of the app's registered redirect URLs; an unmatched one leaves the
|
|
4568
4568
|
* user on the Passflow server's start page. Default: the address the hosted sign-in landed on.
|
|
4569
4569
|
*
|
|
4570
|
-
*
|
|
4571
|
-
*
|
|
4572
|
-
*
|
|
4573
|
-
*
|
|
4574
|
-
*
|
|
4570
|
+
* It is also sent as `post_logout_redirect_uri` in the logout request. After a hosted sign-in
|
|
4571
|
+
* the request carries the address by default too, the same one the `/oidc/end_session` visit
|
|
4572
|
+
* uses. For a session from a SAML connection the server then returns the browser there after
|
|
4573
|
+
* the identity provider's single logout, instead of its own signed-out page. The server
|
|
4574
|
+
* ignores an address that is not a registered redirect URL. Needs Passflow server v0.137.1 or
|
|
4575
|
+
* later; older servers ignore it.
|
|
4575
4576
|
*/
|
|
4576
4577
|
postLogoutRedirectUri?: string;
|
|
4577
4578
|
/**
|
|
4578
4579
|
* When the logout answer carries `saml_logout_url` (a session from a SAML connection with
|
|
4579
4580
|
* SP-initiated logout), send the browser there after the local sign-out, so the identity
|
|
4580
|
-
* provider ends its session too. Default false: the URL is only returned.
|
|
4581
|
-
* `/oidc/end_session
|
|
4581
|
+
* provider ends its session too. Default false: the URL is only returned. After a hosted
|
|
4582
|
+
* sign-in the page goes there instead of `/oidc/end_session`: the session already ended at the
|
|
4583
|
+
* logout request, so `/oidc/end_session` could no longer reach the identity provider.
|
|
4582
4584
|
*/
|
|
4583
4585
|
followSamlLogout?: boolean;
|
|
4584
4586
|
};
|
|
@@ -4813,7 +4815,8 @@ export declare class AuthService {
|
|
|
4813
4815
|
*
|
|
4814
4816
|
* Emits no `SignOut`: `Passflow.logOut()` emits exactly one, after this resolves.
|
|
4815
4817
|
*
|
|
4816
|
-
* @param postLogoutRedirectUri - sent as `post_logout_redirect_uri` in the logout request
|
|
4818
|
+
* @param postLogoutRedirectUri - sent as `post_logout_redirect_uri` in the logout request. After a
|
|
4819
|
+
* hosted sign-in the address the hosted sign-in landed on is sent when this is not set
|
|
4817
4820
|
* @returns the `sub` of the session that ended, when known, and the SAML identity provider's
|
|
4818
4821
|
* logout address when the logout answer carried one
|
|
4819
4822
|
*/
|
|
@@ -7139,13 +7142,16 @@ export declare class Passflow {
|
|
|
7139
7142
|
* A session from a SAML connection with SP-initiated logout also has a session at the identity
|
|
7140
7143
|
* provider. The server then answers with its logout address, returned as `samlLogoutUrl` after
|
|
7141
7144
|
* the local session is cleared. With `followSamlLogout: true` the page goes there after the one
|
|
7142
|
-
* `SignOut
|
|
7143
|
-
*
|
|
7145
|
+
* `SignOut`, instead of `/oidc/end_session`: the session already ended at the logout request,
|
|
7146
|
+
* so the `/oidc/end_session` visit could no longer send the identity provider a LogoutRequest.
|
|
7147
|
+
* Without the option, or without a `samlLogoutUrl`, a hosted sign-in still goes to
|
|
7148
|
+
* `/oidc/end_session`.
|
|
7144
7149
|
*
|
|
7145
7150
|
* @param options.postLogoutRedirectUri - where to return after a hosted sign-out; must match one
|
|
7146
|
-
* of the app's registered redirect URLs.
|
|
7147
|
-
*
|
|
7148
|
-
*
|
|
7151
|
+
* of the app's registered redirect URLs. It is also sent in the logout request, and after a SAML
|
|
7152
|
+
* single logout the server returns the browser there (Passflow server v0.137.1 or later; older
|
|
7153
|
+
* servers ignore it). After a hosted sign-in the logout request carries the same return address
|
|
7154
|
+
* the `/oidc/end_session` visit uses: this one, else the address the hosted sign-in landed on
|
|
7149
7155
|
* @param options.followSamlLogout - navigate to the SAML identity provider's logout address when
|
|
7150
7156
|
* the server returns one
|
|
7151
7157
|
* @returns `{ samlLogoutUrl }` when the server returned the identity provider's logout address,
|
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ var a = "__passflowAntiBot", o = (e, t) => {
|
|
|
11
11
|
if (typeof e != "object" || !e) return;
|
|
12
12
|
let t = e[a];
|
|
13
13
|
return typeof t == "object" && t ? t : void 0;
|
|
14
|
-
}, c = "0.42.
|
|
14
|
+
}, c = "0.42.1", l = "X-Passflow-Clientid", u = "Authorization", d = "X-Passflow-DeviceId", f = "X-Passflow-DeviceType", p = "X-Passflow-Anti-Bot", m = "X-Passflow-Agent-Tool", h = "X-Passflow-Device-Proof", g = "passflow_auth", _ = c, v = [
|
|
15
15
|
"id",
|
|
16
16
|
"offline",
|
|
17
17
|
"openid"
|
|
@@ -4976,9 +4976,9 @@ var Za = 10, Qa = "The sign-in answered with a PKCE code, but its verifier is go
|
|
|
4976
4976
|
}
|
|
4977
4977
|
}
|
|
4978
4978
|
async logOut(e) {
|
|
4979
|
-
let t = this.refresh.identity(), n;
|
|
4980
|
-
return await this.refresh.signOut(async (
|
|
4981
|
-
n = await this.callLogoutApi(
|
|
4979
|
+
let t = this.refresh.identity(), n, r = e ?? this.storageManager.getHostedSignIn();
|
|
4980
|
+
return await this.refresh.signOut(async (e) => {
|
|
4981
|
+
n = await this.callLogoutApi(e, r), this.forgetPkceSignIn(), this.forgetPendingPasswordless(), this.emailChallenges.clear(), this.clearLocalSession();
|
|
4982
4982
|
}), {
|
|
4983
4983
|
userId: t,
|
|
4984
4984
|
samlLogoutUrl: n
|
|
@@ -7967,7 +7967,7 @@ var Za = 10, Qa = "The sign-in answered with a PKCE code, but its verifier is go
|
|
|
7967
7967
|
}
|
|
7968
7968
|
async logOut(e = {}) {
|
|
7969
7969
|
try {
|
|
7970
|
-
let t = this.authService.hostedEndSessionUrl(e.postLogoutRedirectUri), { userId: n, samlLogoutUrl: r } = await this.authService.logOut(e.postLogoutRedirectUri), i =
|
|
7970
|
+
let t = this.authService.hostedEndSessionUrl(e.postLogoutRedirectUri), { userId: n, samlLogoutUrl: r } = await this.authService.logOut(e.postLogoutRedirectUri), i = e.followSamlLogout && r ? r : t;
|
|
7971
7971
|
try {
|
|
7972
7972
|
this.twoFactorService.clearPartialAuthState(), this.notifySignedOut(n), await this.submitSessionCheck();
|
|
7973
7973
|
} finally {
|