feat(users): Implemented Set-Cookie (#3865)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Rachit Naithani
2024-03-11 12:05:18 +05:30
committed by GitHub
parent e1b894770f
commit 44eef46e5d
11 changed files with 198 additions and 66 deletions

View File

@ -170,3 +170,10 @@ pub async fn get_user_from_db_by_email(
.await
.map(UserFromStorage::from)
}
pub fn get_token_from_signin_response(resp: &user_api::SignInResponse) -> Secret<String> {
match resp {
user_api::SignInResponse::DashboardEntry(data) => data.token.clone(),
user_api::SignInResponse::MerchantSelect(data) => data.token.clone(),
}
}