Changeset View
Changeset View
Standalone View
Standalone View
keyserver/src/responders/user-responders.js
Show First 20 Lines • Show All 559 Lines • ▼ Show 20 Lines | const siweAccountCreationRequest = { | ||||
socialProof, | socialProof, | ||||
}; | }; | ||||
userID = await processSIWEAccountCreation( | userID = await processSIWEAccountCreation( | ||||
viewer, | viewer, | ||||
siweAccountCreationRequest, | siweAccountCreationRequest, | ||||
); | ); | ||||
} | } | ||||
// 9. Complete login with call to `processSuccessfulLogin(...)`. | // 9. Try to double-write SIWE account info to the Identity service | ||||
const userIDCopy = userID; | |||||
if (identityKeys && signedIdentityKeysBlob) { | |||||
const identityKeysCopy = identityKeys; | |||||
handleAsyncPromise( | |||||
(async () => { | |||||
const rustAPI = await getRustAPI(); | |||||
rustAPI.loginUserWallet( | |||||
userIDCopy, | |||||
identityKeysCopy.primaryIdentityPublicKeys.ed25519, | |||||
siweMessage.toMessage(), | |||||
signature, | |||||
signedIdentityKeysBlob, | |||||
JSON.stringify(socialProof), | |||||
); | |||||
})(), | |||||
); | |||||
} | |||||
// 10. Complete login with call to `processSuccessfulLogin(...)`. | |||||
return await processSuccessfulLogin({ | return await processSuccessfulLogin({ | ||||
viewer, | viewer, | ||||
input, | input, | ||||
userID, | userID, | ||||
calendarQuery, | calendarQuery, | ||||
socialProof, | socialProof, | ||||
signedIdentityKeysBlob, | signedIdentityKeysBlob, | ||||
}); | }); | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |