fluentcms / FluentCMS

ASP.NET Core Blazor Content Management System (CMS)
https://www.fluentcms.com
MIT License
29 stars 8 forks source link

Refactor AuthManager for ApiClientFactory #1773

Closed pournasserian closed 4 days ago

pournasserian commented 4 days ago

Refactored AuthManager to utilize ApiClientFactory instead of IHttpClientFactory, streamlining the creation and usage of API clients within the class. The constructor now accepts an ApiClientFactory instance, enhancing the instantiation process of API clients. Additionally, the Login method has been simplified by directly using the apiClient to access an Account client for authentication, removing the need to manually create HttpClient and AccountClient instances. This change aims to simplify and improve the efficiency of the authentication process.