фиксы
This commit is contained in:
parent
5167076340
commit
0a840a32dc
@ -58,7 +58,8 @@ public class UsersController : ControllerBase
|
||||
Fio = user.Fio,
|
||||
Specialities = user.Specialities,
|
||||
TelegramBotUrl = user.TelegramBotUrl,
|
||||
UserName = user.Username
|
||||
UserName = user.Username,
|
||||
Email = user.Email
|
||||
};
|
||||
var result = await _userManager.CreateAsync(userWr);
|
||||
|
||||
@ -103,7 +104,7 @@ public class UsersController : ControllerBase
|
||||
fuser.Specialities = user.Specialities;
|
||||
fuser.TelegramBotUrl = user.TelegramBotUrl;
|
||||
fuser.UserName = user.Username;
|
||||
|
||||
fuser.Email = user.Email;
|
||||
var result = await _userManager.UpdateAsync(fuser);
|
||||
if (result.Succeeded)
|
||||
return Ok();
|
||||
@ -140,7 +141,7 @@ public class UsersController : ControllerBase
|
||||
[HttpGet("signin-google")]
|
||||
public IActionResult SignInWithGoogle()
|
||||
{
|
||||
var properties = new AuthenticationProperties { RedirectUri = "https://cyberbloom.zetcraft.ru/api/users/signin-google" };
|
||||
var properties = new AuthenticationProperties { RedirectUri = Url.Action(nameof(SignInWithGoogleCallback)) };
|
||||
return Challenge(properties, GoogleDefaults.AuthenticationScheme);
|
||||
}
|
||||
|
||||
|
@ -9,4 +9,6 @@ public class UserPost
|
||||
public string Specialities { get; set; } = null!;
|
||||
|
||||
public string TelegramBotUrl { get; set; } = null!;
|
||||
|
||||
public string Email { get; set; } = null!;
|
||||
}
|
||||
|
@ -11,4 +11,6 @@ public class UserPut
|
||||
public string Specialities { get; set; } = null!;
|
||||
|
||||
public string TelegramBotUrl { get; set; } = null!;
|
||||
|
||||
public string Email { get; set; } = null!;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ builder.Services.AddAuthentication(opt => {
|
||||
{
|
||||
options.ClientId = builder.Configuration["Google:ClientId"]!;
|
||||
options.ClientSecret = builder.Configuration["Google:ClientSecret"]!;
|
||||
options.CallbackPath = "https://cyberbloom.zetcraft.ru/api/users/google-sign-in";
|
||||
options.CallbackPath = "/api/signin-google";
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user