From 6e5d8f00e4e375d855fc99b8a676572248dd5801 Mon Sep 17 00:00:00 2001 From: Yaser Moradi Date: Mon, 8 Jul 2024 15:26:23 +0200 Subject: [PATCH] fix --- .../Controllers/Identity/IdentityController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Controllers/Identity/IdentityController.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Controllers/Identity/IdentityController.cs index 76ad96264e..9d90aded96 100644 --- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Controllers/Identity/IdentityController.cs +++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Controllers/Identity/IdentityController.cs @@ -464,9 +464,9 @@ public async Task SocialSignInCallback(string? returnUrl = null, i await Request.HttpContext.SignOutAsync(IdentityConstants.ExternalScheme); // We'll handle sign-in with the following redirects, so no external identity cookie is needed. } - if (localHttpPort is null) return LocalRedirect($"~/{url}"); - - return Redirect(new Uri(new Uri($"http://localhost:{localHttpPort}/"), url).ToString()); + if (localHttpPort is not null) return Redirect(new Uri(new Uri($"http://localhost:{localHttpPort}/"), url).ToString()); + if (string.IsNullOrEmpty(AppSettings.WebClientUrl) is false) return Redirect(new Uri(new Uri(AppSettings.WebClientUrl), url).ToString()); + return LocalRedirect($"~/{url}"); } [HttpGet]