Wizard: login to the portal after completing the wizard

This commit is contained in:
pavelbannov 2023-05-30 11:58:17 +03:00
parent 01c3b6e2a1
commit daef20f563

View File

@ -42,6 +42,7 @@ public class FirstTimeTenantSettings
private readonly TimeZoneConverter _timeZoneConverter;
private readonly CoreBaseSettings _coreBaseSettings;
private readonly IHttpClientFactory _clientFactory;
private readonly CookiesManager _cookiesManager;
public FirstTimeTenantSettings(
ILogger<FirstTimeTenantSettings> logger,
@ -56,7 +57,8 @@ public class FirstTimeTenantSettings
StudioNotifyService studioNotifyService,
TimeZoneConverter timeZoneConverter,
CoreBaseSettings coreBaseSettings,
IHttpClientFactory clientFactory)
IHttpClientFactory clientFactory,
CookiesManager cookiesManager)
{
_log = logger;
_tenantManager = tenantManager;
@ -71,6 +73,7 @@ public class FirstTimeTenantSettings
_timeZoneConverter = timeZoneConverter;
_coreBaseSettings = coreBaseSettings;
_clientFactory = clientFactory;
_cookiesManager = cookiesManager;
}
public async Task<WizardSettings> SaveData(WizardRequestsDto inDto)
@ -149,6 +152,8 @@ public class FirstTimeTenantSettings
SubscribeFromSite(currentUser);
}
_cookiesManager.AuthenticateMeAndSetCookies(currentUser.Tenant, currentUser.Id, MessageAction.LoginSuccess);
return settings;
}
catch (BillingNotFoundException)