Ajoutez des fichiers projet.

This commit is contained in:
taywon18
2024-09-19 22:06:37 +02:00
parent 7420a47dc6
commit 70fe271ba4
39 changed files with 1605 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
using Microsoft.AspNetCore.Components.Authorization;
namespace Tagger.Service;
public class UserManager
{
public async Task<bool> IsLogged(AuthenticationStateProvider stateProvider)
{
var authState = await stateProvider.GetAuthenticationStateAsync();
var user = authState.User;
return (user.Identity is not null && user.Identity.IsAuthenticated);
}
}