/// <summary>
        /// Gets the current authenticated used using JavaScript interop.
        /// </summary>
        /// <returns>A <see cref="Task{ClaimsPrincipal}"/>that will return the current authenticated user when completes.</returns>
        protected internal virtual async ValueTask <ClaimsPrincipal> GetAuthenticatedUser()
        {
            await EnsureAuthService();

            var account = await JsRuntime.InvokeAsync <TAccount>("AuthenticationService.getUser");

            var user = await AccountClaimsPrincipalFactory.CreateUserAsync(account, Options.UserOptions);

            return(user);
        }