@hanzo/app 0.3.64 → 0.3.65
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/lib/signout.d.ts +8 -2
- package/dist/lib/signout.js +13 -4
- package/package.json +3 -3
package/dist/lib/signout.d.ts
CHANGED
|
@@ -14,12 +14,18 @@ export declare const OUT = "/login?from=logout";
|
|
|
14
14
|
* IAM's /v1/iam routes, IAM's session here ended, the local session cleared —
|
|
15
15
|
* counted as logout_completed, and then /login?from=logout (or `to`: the account
|
|
16
16
|
* chooser, which signs everyone out and stays on the request it was drawn for),
|
|
17
|
-
* where the person can sign straight back in.
|
|
18
|
-
* visited.
|
|
17
|
+
* where the person can sign straight back in.
|
|
19
18
|
*
|
|
20
19
|
* EVERY HANZO SITE AT ONCE (`everywhere`). hanzo.ai and platform.hanzo.ai sign in
|
|
21
20
|
* from one session, so leaving one of them must leave the other: IAM retires the
|
|
22
21
|
* person's grant to every application of this client's organization along with
|
|
23
22
|
* the session. A third-party app the person signed into keeps its own.
|
|
23
|
+
*
|
|
24
|
+
* AND EVERY SIGN-IN ORIGIN (D3). A plain sign-out ends through the issuer's
|
|
25
|
+
* end-session page (`issuer`, @hanzo/ui 8.31), which ends the session hanzo.id
|
|
26
|
+
* and hanzo.market hold for this person as well as this origin's, and lands on
|
|
27
|
+
* the issuer's sign-in, hanzo.ai/login. A sign-out with its own `to` is the
|
|
28
|
+
* account chooser's, which must stay on the request in flight, so it ends here
|
|
29
|
+
* only (an empty issuer).
|
|
24
30
|
*/
|
|
25
31
|
export declare function useSignOut(to?: string): () => Promise<void>;
|
package/dist/lib/signout.js
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* answered on this origin where it answers them (universe static-sites
|
|
6
6
|
* `iam-on-hanzo-ai`): that is also where IAM keeps its session cookie, so the
|
|
7
7
|
* session a person signs in with here is the one a later visit finds, and the
|
|
8
|
-
* one sign-out ends. Nobody is sent to hanzo.id
|
|
8
|
+
* one sign-out ends. Nobody is sent to hanzo.id to sign in; a plain sign-out
|
|
9
|
+
* passes through its end-session page on the way out (`useSignOut`).
|
|
9
10
|
*/
|
|
10
11
|
import { useCallback, useMemo } from 'react';
|
|
11
12
|
import { IAM } from '@hanzo/iam';
|
|
@@ -33,16 +34,24 @@ export const OUT = '/login?from=logout';
|
|
|
33
34
|
* IAM's /v1/iam routes, IAM's session here ended, the local session cleared —
|
|
34
35
|
* counted as logout_completed, and then /login?from=logout (or `to`: the account
|
|
35
36
|
* chooser, which signs everyone out and stays on the request it was drawn for),
|
|
36
|
-
* where the person can sign straight back in.
|
|
37
|
-
* visited.
|
|
37
|
+
* where the person can sign straight back in.
|
|
38
38
|
*
|
|
39
39
|
* EVERY HANZO SITE AT ONCE (`everywhere`). hanzo.ai and platform.hanzo.ai sign in
|
|
40
40
|
* from one session, so leaving one of them must leave the other: IAM retires the
|
|
41
41
|
* person's grant to every application of this client's organization along with
|
|
42
42
|
* the session. A third-party app the person signed into keeps its own.
|
|
43
|
+
*
|
|
44
|
+
* AND EVERY SIGN-IN ORIGIN (D3). A plain sign-out ends through the issuer's
|
|
45
|
+
* end-session page (`issuer`, @hanzo/ui 8.31), which ends the session hanzo.id
|
|
46
|
+
* and hanzo.market hold for this person as well as this origin's, and lands on
|
|
47
|
+
* the issuer's sign-in, hanzo.ai/login. A sign-out with its own `to` is the
|
|
48
|
+
* account chooser's, which must stay on the request in flight, so it ends here
|
|
49
|
+
* only (an empty issuer).
|
|
43
50
|
*/
|
|
44
51
|
export function useSignOut(to = OUT) {
|
|
45
|
-
const
|
|
52
|
+
const { config } = useIam();
|
|
53
|
+
const issuer = to === OUT ? config.serverUrl : '';
|
|
54
|
+
const signOut = useUiSignOut({ to, track, everywhere: true, issuer });
|
|
46
55
|
return useCallback(async () => {
|
|
47
56
|
// Google One Tap signs a returning person in on its own (`auto_select`), which
|
|
48
57
|
// would put them straight back in the account they just left. Leaving says so.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.65",
|
|
4
4
|
"description": "Hanzo's app: the shell and its apps (Home, Chat, Inbox, Contacts, Meet, Calendar, Drive, Board, Work, Bots), once, for every Hanzo surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@hanzo/logo": ">=1.0.26",
|
|
62
62
|
"@hanzo/studio": ">=0.1.0",
|
|
63
63
|
"@hanzo/tabs": ">=0.1.8",
|
|
64
|
-
"@hanzo/ui": ">=8.
|
|
64
|
+
"@hanzo/ui": ">=8.31.0",
|
|
65
65
|
"@hanzo/usage": ">=0.1.18",
|
|
66
66
|
"@hanzo/voice": ">=0.1.16",
|
|
67
67
|
"@hanzogui/shell": "^8.3.20",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@hanzo/logo": "1.0.26",
|
|
83
83
|
"@hanzo/studio": "0.1.0",
|
|
84
84
|
"@hanzo/tabs": "github:hanzo-inc/tabs",
|
|
85
|
-
"@hanzo/ui": "8.
|
|
85
|
+
"@hanzo/ui": "8.31.0",
|
|
86
86
|
"@hanzo/usage": "0.1.18",
|
|
87
87
|
"@hanzo/voice": "0.1.19",
|
|
88
88
|
"@hanzogui/config": "8.3.5",
|