Compare commits
No commits in common. "5bef2b0dbc04f8731bde02810e6fc10710a3ddb7" and "651bd5b82287eb51870bc97fe99566980cd4f082" have entirely different histories.
5bef2b0dbc
...
651bd5b822
@ -58,8 +58,7 @@ public class UsersController : ControllerBase
|
||||
Fio = user.Fio,
|
||||
Specialities = user.Specialities,
|
||||
TelegramBotUrl = user.TelegramBotUrl,
|
||||
UserName = user.Username,
|
||||
Email = user.Email
|
||||
UserName = user.Username
|
||||
};
|
||||
var result = await _userManager.CreateAsync(userWr);
|
||||
|
||||
@ -104,7 +103,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();
|
||||
@ -141,7 +140,7 @@ public class UsersController : ControllerBase
|
||||
[HttpGet("signin-google")]
|
||||
public IActionResult SignInWithGoogle()
|
||||
{
|
||||
var properties = new AuthenticationProperties { RedirectUri = Url.Action(nameof(SignInWithGoogleCallback)) };
|
||||
var properties = new AuthenticationProperties { RedirectUri = "https://cyberbloom.zetcraft.ru/api/users/signin-google" };
|
||||
return Challenge(properties, GoogleDefaults.AuthenticationScheme);
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,4 @@ public class UserPost
|
||||
public string Specialities { get; set; } = null!;
|
||||
|
||||
public string TelegramBotUrl { get; set; } = null!;
|
||||
|
||||
public string Email { get; set; } = null!;
|
||||
}
|
||||
|
@ -11,6 +11,4 @@ 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 = "/api/signin-google";
|
||||
options.CallbackPath = "https://cyberbloom.zetcraft.ru/api/users/google-sign-in";
|
||||
});
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user