public async Task <IActionResult> LoginCallback(string redirectUri = "") { var email = ClaimsReader.ReadEmail(this.User); if (email == null) { throw new UnknownProviderException(); } var user = await this.userService.GetOrCreateUserByEmailAsync( email, ClaimsReader.ReadName(this.User), ClaimsReader.ReadSubject(this.User)); if (string.IsNullOrWhiteSpace(redirectUri)) { return(Ok()); } else { return(Redirect(redirectUri)); } }