we have to do this for both wallet and pake login, so moving it to a helper fn to avoid duplicating code
Depends on D4286
Differential D4289
[services][identity] subroutine for generating token and writing it to db varun on Jun 17 2022, 1:52 PM. Authored by Tags None Referenced Files
Details we have to do this for both wallet and pake login, so moving it to a helper fn to avoid duplicating code Depends on D4286 cargo build, further testing done in functions that leverage this helper
Diff Detail
Event Timeline
Comment Actions Whatever was landed wasn't the latest revision of this diff + doesn't build. Going to revert commit on master, this diff will need to be re-opened Comment Actions error[E0432]: unresolved import `crate::token::AccessToken` --> src/service.rs:11:20 | 11 | use crate::token::{AccessToken, AuthType}; | ^^^^^^^^^^^ no `AccessToken` in `token` error[E0432]: unresolved import `proto::pake_login_response::Data::Token` --> src/service.rs:18:46 | 18 | login_response::Data::WalletLoginResponse, pake_login_response::Data::Token, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `Token` in `service::proto::pake_login_response::Data` error[E0599]: no method named `put_token` found for struct `DatabaseClient` in the current scope --> src/service.rs:106:16 | 106 | match client.put_token(token.clone()).await { | ^^^^^^^^^ method not found in `DatabaseClient` | ::: src/database.rs:16:1 | 16 | pub struct DatabaseClient { | ------------------------- method `put_token` not found for this error[E0560]: struct `WalletLoginResponse` has no field named `token` --> src/service.rs:110:11 | 110 | token: token.token, | ^^^^^ `WalletLoginResponse` does not have this field | = note: available fields are: `access_token` Some errors have detailed explanations: E0432, E0560, E0599. For more information about an error, try `rustc --explain E0432`. error: could not compile `identity` due to 4 previous errors |