mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
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:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user