From 55360388f4a7633f57bdf9edab208dd5b7b7cde6 Mon Sep 17 00:00:00 2001 From: Sai Harsha Vardhan <56996463+sai-harsha-vardhan@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:38:20 +0530 Subject: [PATCH] fix(router): add new api endpoint for post authentication sync in modular authentication (#9615) Co-authored-by: Sahkal Poddar Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> --- crates/router/src/core/unified_authentication_service.rs | 2 +- crates/router/src/routes/app.rs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/router/src/core/unified_authentication_service.rs b/crates/router/src/core/unified_authentication_service.rs index 8c7086b7fd..49ca215ba8 100644 --- a/crates/router/src/core/unified_authentication_service.rs +++ b/crates/router/src/core/unified_authentication_service.rs @@ -943,7 +943,7 @@ pub async fn authentication_eligibility_core( let notification_url = match authentication_connector { common_enums::AuthenticationConnectors::Juspaythreedsserver => { Some(url::Url::parse(&format!( - "{base_url}/authentication/{merchant_id}/{authentication_id}/sync", + "{base_url}/authentication/{merchant_id}/{authentication_id}/redirect", base_url = state.base_url, merchant_id = merchant_id.get_string_repr(), authentication_id = authentication_id.get_string_repr() diff --git a/crates/router/src/routes/app.rs b/crates/router/src/routes/app.rs index acbb7b6072..341af8bc16 100644 --- a/crates/router/src/routes/app.rs +++ b/crates/router/src/routes/app.rs @@ -2982,10 +2982,13 @@ impl Authentication { web::resource("/{authentication_id}/authenticate") .route(web::post().to(authentication::authentication_authenticate)), ) + .service( + web::resource("{merchant_id}/{authentication_id}/redirect") + .route(web::post().to(authentication::authentication_sync_post_update)), + ) .service( web::resource("{merchant_id}/{authentication_id}/sync") - .route(web::post().to(authentication::authentication_sync)) - .route(web::get().to(authentication::authentication_sync_post_update)), + .route(web::post().to(authentication::authentication_sync)), ) } }