Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task<IActionResult> OnPostConfirmationAsync(string returnUrl = null)
- {
- returnUrl = returnUrl ?? Url.Content("~/");
- // Get the information about the user from the external login provider
- var info = await _signInManager.GetExternalLoginInfoAsync();
- if (info == null)
- {
- ErrorMessage = "Error loading external login information during confirmation.";
- return RedirectToPage("./Login", new { ReturnUrl = returnUrl });
- }
- if (ModelState.IsValid)
- {
- var user = new IdentityUser { UserName = Input.Email, Email = Input.Email };
- var result = await _userManager.CreateAsync(user);
- if (result.Succeeded)
- {
- result = await _userManager.AddLoginAsync(user, info);
- if (result.Succeeded)
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement