Details
Registered a new user and verified that the device code version and login date are stored in the database.
Logged in as that user but with a new device, made sure the data is stored for the new device too.
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
services/identity/src/client_service.rs | ||
---|---|---|
223 ↗ | (On Diff #34828) | This is the timestamp access token is "minted". Since it is generated in all Login/Register RPCs right after this call (AccessTokenData::new()), I let myself use Utc::now() for simplicity |
791 ↗ | (On Diff #34828) | Reusing existing get_version_info() actually resulted in more code than implementing this func |
services/identity/src/client_service.rs | ||
---|---|---|
223 ↗ | (On Diff #34828) | wouldn't it be more correct to create the access token and then call add_password_user_to_users_table with that token's created field? |
services/identity/src/client_service.rs | ||
---|---|---|
223 ↗ | (On Diff #34828) | The problem is that AccessTokenData::new() (see L229 below) already requires user_id so this call needs to be first 😕 This "login time" is a temporary thing anyway so I see two ways out:
|
back to you
services/identity/src/client_service.rs | ||
---|---|---|
223 ↗ | (On Diff #34828) | ah I see. i think we should do option 2, but rather than changing AccessTokenData::new(), we should add a new method AccessTokenData::with_created_time() |