Feature: Google and Facebook sign-in

This commit is contained in:
Kamigen
2024-06-05 16:01:44 -04:00
parent fc0c94306b
commit aa8a5ad93d
6 changed files with 96 additions and 34 deletions

View File

@@ -1,5 +1,4 @@
using System.Text;
using Google.Apis.Oauth2.v2.Data;
using System.Security.Claims;
using Hutopy.Domain.Interfaces;
using Hutopy.Domain.Models;
@@ -30,11 +29,6 @@ public class UserService(UserManager<ApplicationUser> userManager, IHttpContextA
}
}
public async Task CreateUserAsync(Userinfo userInfo)
{
await CreateUserAsync(userInfo.Email, userInfo.GivenName, userInfo.GivenName, userInfo.FamilyName, RandomGenerator.RandomString(24));
}
public async Task<UserModel?> FindUserByIdAsync(string id)
{
var response = await userManager.FindByIdAsync(id);