Page MenuHomePhabricator

D5209.id16973.diff
No OneTemporary

D5209.id16973.diff

diff --git a/services/identity/src/service.rs b/services/identity/src/service.rs
--- a/services/identity/src/service.rs
+++ b/services/identity/src/service.rs
@@ -461,26 +461,34 @@
error!("Too many messages received in stream, aborting");
return Err(Status::aborted("please retry"));
}
- match parse_and_verify_siwe_message(
+ parse_and_verify_siwe_message(
&wallet_login_request.user_id,
&wallet_login_request.device_id,
&wallet_login_request.siwe_message,
wallet_login_request.siwe_signature,
- ) {
- Ok(()) => Ok(LoginResponse {
- data: Some(WalletLoginResponse(WalletLoginResponseStruct {
- access_token: put_token_helper(
- client,
- AuthType::Wallet,
- &wallet_login_request.user_id,
- &wallet_login_request.device_id,
- rng,
- )
- .await?,
- })),
- }),
- Err(e) => Err(e),
- }
+ )?;
+ client
+ .update_users_table(
+ wallet_login_request.user_id.clone(),
+ wallet_login_request.device_id.clone(),
+ None,
+ None,
+ Some(wallet_login_request.user_public_key),
+ )
+ .await
+ .map_err(|e| handle_db_error(e))?;
+ Ok(LoginResponse {
+ data: Some(WalletLoginResponse(WalletLoginResponseStruct {
+ access_token: put_token_helper(
+ client,
+ AuthType::Wallet,
+ &wallet_login_request.user_id,
+ &wallet_login_request.device_id,
+ rng,
+ )
+ .await?,
+ })),
+ })
}
async fn pake_login_start(

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 4, 11:31 AM (9 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2614121
Default Alt Text
D5209.id16973.diff (1 KB)

Event Timeline