Last active
April 26, 2024 19:51
-
-
Save vdhanan/be35b6552248428fce2d20a55c6b65cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/keyserver/src/user/login.js b/keyserver/src/user/login.js | |
index 57e54776bb..99823c4897 100644 | |
--- a/keyserver/src/user/login.js | |
+++ b/keyserver/src/user/login.js | |
@@ -30,6 +30,7 @@ function markKeysAsPublished(account: OlmAccount) { | |
// Before attempting login | |
function markPrekeyAsPublished(account: OlmAccount) { | |
+ console.log('unpublished prekey', account.unpublished_prekey()); | |
account.mark_prekey_as_published(); | |
+ console.log( | |
+ 'unpublished prekey should be null', | |
+ account.unpublished_prekey(), | |
+ ); | |
} | |
@@ -61,6 +62,7 @@ async function getUserCredentials(): Promise<UserCredentials> { | |
} | |
async function verifyUserLoggedIn(): Promise<IdentityInfo> { | |
+ console.log('got here'); | |
const userInfoPromise = getUserCredentials(); | |
const result = await fetchIdentityInfo(); | |
@@ -195,11 +197,20 @@ async function registerOrLogInBase<T>( | |
getUpdateContentAccount(contentAccountCallback), | |
]); | |
+ console.log('prekey before marking as published:', contentPrekey); | |
+ | |
try { | |
await Promise.all([ | |
getUpdateContentAccount(markPrekeyAsPublished), | |
getUpdateNotificationsAccount(markPrekeyAsPublished), | |
]); | |
+ | |
+ const { prekey: newPrekey } = await getUpdateContentAccount( | |
+ contentAccountCallback, | |
+ ); | |
+ | |
+ console.log('prekey after marking as published:', newPrekey); | |
+ | |
return await rustAPI.loginUser( | |
userInfo.username, | |
userInfo.password, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From logs:
[NODEM] prekey before marking as published: e5YteRTKpSoNJ9WAZsqhPyaJuaQaMAPYcYYGfCTm3WQ
[NODEM] unpublished prekey {"curve25519":{"AAAAAQ":"e5YteRTKpSoNJ9WAZsqhPyaJuaQaMAPYcYYGfCTm3WQ"}}
[NODEM] unpublished prekey should be null null
[NODEM] prekey after marking as published: e5YteRTKpSoNJ9WAZsqhPyaJuaQaMAPYcYYGfCTm3WQ