Not exactly sure what you're asking here, but it is possible to have multiple projects communicate with each other.
SignalR Core is the key to make this possible. It just requires a hub running.
For blazor: https://learn.microsoft.com/en-us/aspnet/core/tutorials/signalr-blazor?view=aspnetcore-5.0&tabs=visual-studio&pivots=server
On the other app, I used a C# console to communicate with my website. Here's an example code
using Microsoft.AspNetCore.SignalR.Client;
using System;
namespace SignalRConsole
{
class Program
{
static void Main(string[] args)
{
HubConnection hubConnection;
hubConnection = new HubConnectionBuilder()
.WithAutomaticReconnect()
.WithUrl("https://localhost/{hubname}")
.Build();
hubConnection.On<bool>("IsAuthenticated", (b) =>
{
if (b)
Console.WriteLine("Valid");
else
Console.WriteLine("Invalid");
});
hubConnection.StartAsync();
while (true)
{
Console.WriteLine("Username");
string username = Console.ReadLine();
Console.WriteLine("Password");
string pwd = Console.ReadLine();
hubConnection.SendAsync("CheckLogin", username, pwd);
}
}
}
}
On the blazor hub class
public class AppHub : Hub
{
private readonly UserManager<IdentityUser> _userManager;
public AppHub(UserManager<SocialUser> userManager)
{
_userManager = userManager;
}
public async void CheckLogin(string UserName, string pwd)
{
var user = _userManager.Users.Where(x => x.UserName == UserName).FirstOrDefault();
if (_userManager.CheckPasswordAsync(user, pwd).Result)
{
//This is optional
await Groups.AddToGroupAsync(Context.ConnectionId, UserName);
await Clients.Caller.SendAsync("IsAuthenticated", true);
}
else
await Clients.Caller.SendAsync("IsAuthenticated", false);
}
}
If that wasn't the answer you're looking for, wouldn't it be best just to use a database to determine who has authentication?