@@ -75,7 +75,7 @@ export default function AuthPage() {
75
75
76
76
console . log (
77
77
"Using existing target key stored in localStorage: " ,
78
- parsedKey . publicKeyUncompressed
78
+ parsedKey . publicKeyUncompressed ,
79
79
) ;
80
80
return ;
81
81
}
@@ -86,7 +86,7 @@ export default function AuthPage() {
86
86
setItemWithExpiry (
87
87
TURNKEY_EMBEDDED_KEY ,
88
88
JSON . stringify ( key ) ,
89
- TURNKEY_EMBEDDED_KEY_TTL_IN_MILLIS
89
+ TURNKEY_EMBEDDED_KEY_TTL_IN_MILLIS ,
90
90
) ;
91
91
setTargetPublicKey ( targetPubHex ! ) ;
92
92
@@ -123,15 +123,15 @@ export default function AuthPage() {
123
123
// This is decrypting the user-provided email auth bundle using the locally stored target embedded key
124
124
decryptedData = decryptCredentialBundle (
125
125
data . authBundle ,
126
- parsed . privateKey
126
+ parsed . privateKey ,
127
127
) ;
128
128
129
129
// Save the email auth bundle to local storage as well. This can be reused in order for the
130
130
// end user to avoid having to email auth repeatedly
131
131
setItemWithExpiry (
132
132
TURNKEY_CREDENTIAL_BUNDLE ,
133
133
data . authBundle ,
134
- TURNKEY_CREDENTIAL_BUNDLE_TTL_IN_MILLIS
134
+ TURNKEY_CREDENTIAL_BUNDLE_TTL_IN_MILLIS ,
135
135
) ;
136
136
} catch ( e ) {
137
137
const msg = `Error while injecting bundle: ${ e } ` ;
@@ -193,13 +193,13 @@ export default function AuthPage() {
193
193
const parsedKey = JSON . parse ( embeddedKey ) ;
194
194
195
195
const localCredentialBundle = getItemWithExpiry (
196
- TURNKEY_CREDENTIAL_BUNDLE
196
+ TURNKEY_CREDENTIAL_BUNDLE ,
197
197
) ;
198
198
199
199
// This is decrypting the locally stored email auth bundle using the locally stored target embedded key
200
200
decryptedData = decryptCredentialBundle (
201
201
localCredentialBundle ,
202
- parsedKey . privateKey
202
+ parsedKey . privateKey ,
203
203
) ;
204
204
} catch ( e ) {
205
205
const msg = `Error while injecting bundle: ${ e } ` ;
@@ -349,7 +349,7 @@ export default function AuthPage() {
349
349
// ****
350
350
const getPublicKeyFromPrivateKeyHex = ( privateKey : string ) : string => {
351
351
return uint8ArrayToHexString (
352
- getPublicKey ( uint8ArrayFromHexString ( privateKey ) , true )
352
+ getPublicKey ( uint8ArrayFromHexString ( privateKey ) , true ) ,
353
353
) ;
354
354
} ;
355
355
@@ -397,7 +397,7 @@ const setItemWithExpiry = (key: string, value: string, ttl: number) => {
397
397
398
398
const refineNonNull = < T , > (
399
399
input : T | null | undefined ,
400
- errorMessage ?: string
400
+ errorMessage ?: string ,
401
401
) : T => {
402
402
if ( input == null ) {
403
403
throw new Error ( errorMessage ?? `Unexpected ${ JSON . stringify ( input ) } ` ) ;
0 commit comments