This commit removes the `AuthenticationController.cs` and related DTOs, indicating a shift in authentication handling. The `BaseController.cs` has been updated to remove the authorization attribute, affecting access control. Multiple controllers have been restructured to reference `Surge365.Core.Controllers`.
Significant changes in `Program.cs` enhance security and service management with new middleware and JWT configurations. The project file now includes references to `Surge365.Core`, and the `IAuthService` interface has been updated accordingly.
React components have been modified to support the new authentication flow, including token refresh handling. The `customFetch.ts` utility has been improved for better session management. Mapping classes have been introduced or updated for improved entity mapping.
Overall, these changes enhance the application's architecture, security, and data handling processes.
- Implemented Logout and RefreshToken methods in AuthenticationController.
- Added IMailingService and IMailingRepository to Program.cs.
- Updated project structure in Surge365.MassEmailReact.API.csproj.
- Modified API host address and endpoints in Server.http.
- Introduced AuthAppCode in appsettings.json for context distinction.
- Changed GenerateTokens method to async in IAuthService.
- Initialized string properties in User.cs to avoid null values.
- Added new Mailing mapping in DapperConfiguration.cs.
- Created MailingsController for handling mailing operations.
- Developed Mailing, MailingUpdateDto, IMailingService, and IMailingRepository classes.
- Updated frontend with MailingEdit and NewMailings components.
- Enhanced authentication handling in AuthCheck.tsx and AuthContext.tsx.
- Introduced ProtectedPageWrapper for route protection based on roles.
- Added EmailList component for email input validation.
- Updated utils.ts for token and cookie management functions.
- Modified vite.config.ts for new HTTPS certificate name.
- Updated CHANGELOG.md to reflect recent changes.
Updated `AuthenticationController` with new methods for authentication, token refresh, and password recovery. Improved error handling and response structure.
Refactored dependency injection in `Program.cs` and added JWT settings in `appsettings.json`. Removed unused `Class1.cs` files.
Introduced new DTOs for authentication requests and updated `IAuthService` and `IUserRepository` interfaces. Enhanced `User` class and added `AuthResult` enum for standardized responses.
Expanded `DataAccess` for better database operations and updated `UserRepository` and `AuthService` to implement new authentication logic.
Front-end changes include renaming variables for consistency and updating the `ForgotPasswordModal` and `Login.tsx` components to use usernames instead of email addresses.
Updated API proxy path in `vite.config.ts` and ensured proper typing for `API_BASE_URL` in global TypeScript definitions.