It's now time to add the second action method--the one that will receive the HTTP redirection from the external provider with the authorization code and act accordingly:
[HttpGet("ExternalLoginCallback")]public async Task<IActionResult> ExternalLoginCallback( string returnUrl = null, string remoteError = null){ if (!String.IsNullOrEmpty(remoteError)) { // TODO: handle external provider errors throw new Exception(String.Format("External Provider error: {0}", remoteError)); } // Extract the login info obtained from the External Provider var info = await SignInManager.GetExternalLoginInfoAsync(); if (info == null) { // if there's none, emit an error throw new Exception("ERROR: No login info available."); }