@dxos/react-client 0.7.5-main.b19bfc8 → 0.7.5-main.c41020f
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Passkey.stories.d.ts","sourceRoot":"","sources":["../../../../src/halo/Passkey.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;;;;;
|
|
1
|
+
{"version":3,"file":"Passkey.stories.d.ts","sourceRoot":"","sources":["../../../../src/halo/Passkey.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;;;;;AA2HrB,wBAGE;AAsBF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-client",
|
|
3
|
-
"version": "0.7.5-main.
|
|
3
|
+
"version": "0.7.5-main.c41020f",
|
|
4
4
|
"description": "React client API",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -78,40 +78,40 @@
|
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"react-error-boundary": "^4.0.13",
|
|
81
|
-
"@dxos/async": "0.7.5-main.
|
|
82
|
-
"@dxos/client": "0.7.5-main.
|
|
83
|
-
"@dxos/codec-protobuf": "0.7.5-main.
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/
|
|
87
|
-
"@dxos/echo-signals": "0.7.5-main.
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/
|
|
92
|
-
"@dxos/react-hooks": "0.7.5-main.
|
|
93
|
-
"@dxos/
|
|
81
|
+
"@dxos/async": "0.7.5-main.c41020f",
|
|
82
|
+
"@dxos/client": "0.7.5-main.c41020f",
|
|
83
|
+
"@dxos/codec-protobuf": "0.7.5-main.c41020f",
|
|
84
|
+
"@dxos/config": "0.7.5-main.c41020f",
|
|
85
|
+
"@dxos/debug": "0.7.5-main.c41020f",
|
|
86
|
+
"@dxos/invariant": "0.7.5-main.c41020f",
|
|
87
|
+
"@dxos/echo-signals": "0.7.5-main.c41020f",
|
|
88
|
+
"@dxos/log": "0.7.5-main.c41020f",
|
|
89
|
+
"@dxos/protocols": "0.7.5-main.c41020f",
|
|
90
|
+
"@dxos/node-std": "0.7.5-main.c41020f",
|
|
91
|
+
"@dxos/util": "0.7.5-main.c41020f",
|
|
92
|
+
"@dxos/react-hooks": "0.7.5-main.c41020f",
|
|
93
|
+
"@dxos/echo-schema": "0.7.5-main.c41020f"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@types/react": "~18.2.0",
|
|
97
97
|
"@types/react-dom": "~18.2.0",
|
|
98
98
|
"react": "~18.2.0",
|
|
99
99
|
"react-dom": "~18.2.0",
|
|
100
|
-
"@dxos/
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/react-ui
|
|
103
|
-
"@dxos/react-ui-
|
|
104
|
-
"@dxos/
|
|
105
|
-
"@dxos/
|
|
100
|
+
"@dxos/random": "0.7.5-main.c41020f",
|
|
101
|
+
"@dxos/react-ui-syntax-highlighter": "0.7.5-main.c41020f",
|
|
102
|
+
"@dxos/react-ui": "0.7.5-main.c41020f",
|
|
103
|
+
"@dxos/react-ui-theme": "0.7.5-main.c41020f",
|
|
104
|
+
"@dxos/test-utils": "0.7.5-main.c41020f",
|
|
105
|
+
"@dxos/storybook-utils": "0.7.5-main.c41020f"
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
108
|
"react": "~18.2.0",
|
|
109
109
|
"react-dom": "~18.2.0"
|
|
110
110
|
},
|
|
111
111
|
"optionalDependencies": {
|
|
112
|
-
"@dxos/
|
|
113
|
-
"@dxos/
|
|
114
|
-
"@dxos/react-ui
|
|
112
|
+
"@dxos/random": "0.7.5-main.c41020f",
|
|
113
|
+
"@dxos/react-ui-theme": "0.7.5-main.c41020f",
|
|
114
|
+
"@dxos/react-ui": "0.7.5-main.c41020f"
|
|
115
115
|
},
|
|
116
116
|
"publishConfig": {
|
|
117
117
|
"access": "public"
|
|
@@ -35,6 +35,7 @@ const Test = () => {
|
|
|
35
35
|
const handleCreatePassKey = useCallback(async () => {
|
|
36
36
|
invariant(identity, 'Identity not available');
|
|
37
37
|
const challenge = getNewChallenge();
|
|
38
|
+
const lookupKey = PublicKey.random();
|
|
38
39
|
// https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredentialCreationOptions
|
|
39
40
|
const credential = await navigator.credentials
|
|
40
41
|
.create({
|
|
@@ -42,7 +43,7 @@ const Test = () => {
|
|
|
42
43
|
challenge: new TextEncoder().encode(challenge),
|
|
43
44
|
rp: { id: location.hostname, name: 'Test' },
|
|
44
45
|
user: {
|
|
45
|
-
id:
|
|
46
|
+
id: lookupKey.asUint8Array(),
|
|
46
47
|
name: identity.did,
|
|
47
48
|
displayName: identity.profile?.displayName ?? '',
|
|
48
49
|
},
|
|
@@ -66,8 +67,11 @@ const Test = () => {
|
|
|
66
67
|
invariant(client.services.services.IdentityService, 'IdentityService not available');
|
|
67
68
|
// TODO(wittjosiah): This needs a proper api.
|
|
68
69
|
await client.services.services.IdentityService.createRecoveryCredential({
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
data: {
|
|
71
|
+
recoveryKey,
|
|
72
|
+
algorithm,
|
|
73
|
+
lookupKey,
|
|
74
|
+
},
|
|
71
75
|
});
|
|
72
76
|
}, [client, identity]);
|
|
73
77
|
|
|
@@ -86,10 +90,10 @@ const Test = () => {
|
|
|
86
90
|
},
|
|
87
91
|
})
|
|
88
92
|
.catch(log.error);
|
|
89
|
-
const
|
|
93
|
+
const lookupKey = PublicKey.from(new Uint8Array((credential as any).response.userHandle));
|
|
90
94
|
await client.services.services.IdentityService.recoverIdentity({
|
|
91
95
|
external: {
|
|
92
|
-
|
|
96
|
+
lookupKey,
|
|
93
97
|
deviceKey,
|
|
94
98
|
controlFeedKey,
|
|
95
99
|
signature: Buffer.from((credential as any).response.signature),
|
|
@@ -138,8 +142,8 @@ const config = new Config({
|
|
|
138
142
|
},
|
|
139
143
|
services: {
|
|
140
144
|
edge: {
|
|
141
|
-
|
|
142
|
-
url: 'ws://localhost:8787',
|
|
145
|
+
url: 'wss://edge-main.dxos.workers.dev/',
|
|
146
|
+
// url: 'ws://localhost:8787',
|
|
143
147
|
},
|
|
144
148
|
iceProviders: [{ urls: 'https://edge-production.dxos.workers.dev/ice' }],
|
|
145
149
|
},
|