From 8f5e4a200e8984870cb829b6a98cf61b7ccf9551 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 23 Aug 2022 18:56:19 +0000 Subject: [PATCH] create bearer and save bearer separately --- web3_proxy/src/frontend/users.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web3_proxy/src/frontend/users.rs b/web3_proxy/src/frontend/users.rs index 56ee3b1b..a102fdf3 100644 --- a/web3_proxy/src/frontend/users.rs +++ b/web3_proxy/src/frontend/users.rs @@ -158,6 +158,8 @@ pub async fn post_login( todo!("proper error message: {}", e) } + // TODO: create a new auth bearer token (ULID?) + let response = if new_user { // the only thing we need from them is an address // everything else is optional @@ -197,9 +199,9 @@ pub async fn post_login( todo!("load existing user from the database"); }; - // TODO: create a new auth bearer token and save it in redis with a long (7 or 30 day?) expiry. + // TODO: save the auth bearer token in redis with a long (7 or 30 day?) expiry. - // TODO: return the response + Ok(response) } /// the JSON input to the `post_user` handler