fix(users): Fix wrong redirection url in magic link (#3217)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Mani Chandra
2024-01-05 14:36:25 +05:30
committed by GitHub
parent 3ab71fbd5a
commit 000e644388

View File

@ -77,7 +77,7 @@ pub fn get_link_with_token(
token: impl std::fmt::Display,
action: impl std::fmt::Display,
) -> String {
format!("{base_url}/user/{action}/?token={token}")
format!("{base_url}/user/{action}?token={token}")
}
pub struct VerifyEmail {
@ -153,7 +153,8 @@ impl EmailData for MagicLink {
.await
.change_context(EmailError::TokenGenerationFailure)?;
let magic_link_login = get_link_with_token(&self.settings.email.base_url, token, "login");
let magic_link_login =
get_link_with_token(&self.settings.email.base_url, token, "verify_email");
let body = html::get_html_body(EmailBody::MagicLink {
link: magic_link_login,