Tfa: added tfaappwithlink

This commit is contained in:
pavelbannov 2022-07-14 12:57:57 +03:00
parent dfcc00995a
commit 1f01c06185
2 changed files with 11 additions and 2 deletions

View File

@ -235,6 +235,17 @@ public class TfaappController : BaseSettingsController
return result;
}
[HttpPut("tfaappwithlink")]
public async Task<object> TfaSettingsLink(TfaRequestsDto inDto)
{
if (await TfaSettings(inDto))
{
return TfaConfirmUrl();
}
return string.Empty;
}
[HttpGet("tfaapp/setup")]
[Authorize(AuthenticationSchemes = "confirm", Roles = "TfaActivation")]
public SetupCode TfaAppGenerateSetupCode()

View File

@ -261,8 +261,6 @@ public class CookiesManager
_tenantCookieSettingsHelper.SetForTenant(tenant.Id, settings);
await _dbLoginEventsManager.LogOutAllActiveConnectionsForTenant(tenant.Id);
AuthenticateMeAndSetCookies(tenant.Id, _securityContext.CurrentAccount.ID, MessageAction.LoginSuccess);
}
public string AuthenticateMeAndSetCookies(int tenantId, Guid userId, MessageAction action, bool session = false)