Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3384330
D8587.id29020.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D8587.id29020.diff
View Options
diff --git a/keyserver/addons/rust-node-addon/src/identity_client/login.rs b/keyserver/addons/rust-node-addon/src/identity_client/login.rs
--- a/keyserver/addons/rust-node-addon/src/identity_client/login.rs
+++ b/keyserver/addons/rust-node-addon/src/identity_client/login.rs
@@ -27,7 +27,7 @@
let mut client_login = Login::new();
let opaque_login_request = client_login
.start(&password)
- .map_err(|_| Error::from_status(Status::GenericFailure))?;
+ .map_err(|_| Error::from_reason("Failed to create opaque login request"))?;
let login_start_request = OpaqueLoginStartRequest {
opaque_login_request,
@@ -51,26 +51,30 @@
}),
};
+ debug!("Starting login to identity service");
let login_start_response = identity_client
.login_password_user_start(login_start_request)
.await
.map_err(handle_grpc_error)?
.into_inner();
+ debug!("Received login response from identity service");
let opaque_login_upload = client_login
.finish(&login_start_response.opaque_login_response)
- .map_err(|_| Error::from_status(Status::GenericFailure))?;
+ .map_err(|_| Error::from_reason("Failed to finish opaque login request"))?;
let login_finish_request = OpaqueLoginFinishRequest {
session_id: login_start_response.session_id,
opaque_login_upload,
};
+ debug!("Attempting to finalize opaque login exchange with identity service");
let login_finish_response = identity_client
.login_password_user_finish(login_finish_request)
.await
.map_err(handle_grpc_error)?
.into_inner();
+ debug!("Finished login with identity service");
let user_info = UserLoginInfo {
user_id: login_finish_response.user_id,
access_token: login_finish_response.access_token,
diff --git a/keyserver/src/user/login.js b/keyserver/src/user/login.js
--- a/keyserver/src/user/login.js
+++ b/keyserver/src/user/login.js
@@ -172,6 +172,7 @@
]);
return identity_info;
} catch (e) {
+ console.warn('Failed to login user: ' + getMessageForException(e));
try {
const identity_info = await rustAPI.registerUser(
userInfo.username,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 8:32 PM (20 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2597804
Default Alt Text
D8587.id29020.diff (2 KB)
Attached To
Mode
D8587: [Keyserver/rust] Improve debugging
Attached
Detach File
Event Timeline
Log In to Comment