Implementation of the register_user RPC. We only need to do this for PAKE -- there is no registration process for wallet auth. The bulk of the logic is performed in the subroutines. This function handles updating some state and sending messages to the outbound stream.
Details
- Reviewers
• jim tomek • karol - Commits
- rCOMM64a3f6e4ac90: [services][identity] register_user RPC
called the RPC and tested all failure cases as well as the success case. subsequently tried logging in and received a new access token
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
This code is deeply nested which makes it unreadable. Please find a way to improve the readability.
services/identity/src/service.rs | ||
---|---|---|
121 ↗ | (On Diff #13821) | Is it a good idea to clone a client? What happens with connections when a DatabaseClient is cloned? |
services/identity/src/service.rs | ||
---|---|---|
121 ↗ | (On Diff #13821) | it's not a great idea, but it should be fine for v0.1. I think we'll want to have a client pool. I've created a linear task here: https://linear.app/comm/issue/ENG-1297/create-pool-of-database-clients |
Looks ok! It would be great if you could reduce the indentation even more.
services/identity/src/service.rs | ||
---|---|---|
121 ↗ | (On Diff #13821) | Ok, makes sense to do it as a followup. But have you checked if it works at all, with a couple of concurrent clients? |
services/identity/src/service.rs | ||
---|---|---|
121 ↗ | (On Diff #13821) | Yeah, it works with like 5 or 6 concurrent clients. |