Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3399736
D9679.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9679.diff
View Options
diff --git a/services/identity/src/client_service.rs b/services/identity/src/client_service.rs
--- a/services/identity/src/client_service.rs
+++ b/services/identity/src/client_service.rs
@@ -489,7 +489,25 @@
id
}
None => {
- // User doesn't exist yet, so we should add a new user in DDB
+ // It's possible that the user attempting login is already registered
+ // on Ashoat's keyserver. If they are, we should send back a gRPC status
+ // code instructing them to get a signed message from Ashoat's keyserver
+ // in order to claim their wallet address and register with the Identity
+ // service.
+ let username_in_reserved_usernames_table = self
+ .client
+ .username_in_reserved_usernames_table(&wallet_address)
+ .await
+ .map_err(handle_db_error)?;
+
+ if username_in_reserved_usernames_table {
+ return Err(tonic::Status::failed_precondition(
+ "need keyserver message to claim username",
+ ));
+ }
+
+ // User doesn't exist yet and wallet address isn't reserved, so we
+ // should add a new user in DDB
self
.client
.add_wallet_user_to_users_table(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 4:34 AM (21 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2610231
Default Alt Text
D9679.diff (1 KB)
Attached To
Mode
D9679: [identity] check if wallet address is reserved in LoginWalletUser RPC
Attached
Detach File
Event Timeline
Log In to Comment