File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
routes/(new-styling)/authorize Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { PublicKey , type Signature } from "@dfinity/agent" ;
2
2
import { Ed25519KeyIdentity } from "@dfinity/identity" ;
3
- import {
4
- CosePublicKey ,
5
- DiscoverablePasskeyIdentity ,
6
- } from "./discoverablePasskeyIdentity" ;
3
+ import { DiscoverablePasskeyIdentity } from "./discoverablePasskeyIdentity" ;
7
4
8
5
const dummyIdentity = Ed25519KeyIdentity . generate ( new Uint8Array ( 32 ) ) ;
9
6
10
7
export class DiscoverableDummyIdentity extends DiscoverablePasskeyIdentity {
11
- constructor ( ) {
8
+ #name?: string ;
9
+
10
+ constructor ( name ?: string ) {
12
11
super ( ) ;
12
+ this . #name = name ;
13
13
}
14
14
15
15
getPublicKey ( ) : PublicKey {
@@ -25,7 +25,7 @@ export class DiscoverableDummyIdentity extends DiscoverablePasskeyIdentity {
25
25
}
26
26
27
27
getName ( ) : string | undefined {
28
- return ;
28
+ return this . #name ;
29
29
}
30
30
31
31
getAuthenticatorAttachment ( ) : AuthenticatorAttachment | undefined {
Original file line number Diff line number Diff line change 94
94
);
95
95
try {
96
96
const passkeyIdentity = features .DUMMY_AUTH
97
- ? new DiscoverableDummyIdentity ()
97
+ ? new DiscoverableDummyIdentity (name )
98
98
: await DiscoverablePasskeyIdentity .createNew (name );
99
99
await startRegistration ();
100
100
await registerWithPasskey (passkeyIdentity );
You can’t perform that action at this time.
0 commit comments