using FluentResults;
using NexusReader.Application.DTOs.User;

namespace NexusReader.Application.Abstractions.Services;

public interface IIdentityService
{
    event Func<Task>? OnStateInvalidated;
    Task<Result> RegisterAsync(string email, string password);
    Task<Result> LoginAsync(string email, string password, bool rememberMe = false);
    Task<Result> LogoutAsync();
    Task<Result<UserProfileDto>> GetProfileAsync();
    Task<Result> RefreshTokenAsync();
    void ClearCache();
}
