I want to use IdentiyServer4 and add KentorAuthServices middleware for SAML authentication.
From the IdentityServer4 documentation, it is suggested to add a package Microsoft.AspNetCore.Authentication.Cookiesand use middleware with a type of SignIn like IdentityServerConstants.ExternalCookieAuthenticationScheme.
I configured the same, but could not get the access_token in the variable info.
public async Task<IActionResult> ExternalLoginCallback(string returnUrl = null, string remoteError = null)
{
if (remoteError != null)
{
ModelState.AddModelError(string.Empty, $"Error from external provider: {remoteError}");
return View("~/Home/Index");
}
var info = await _signInManager.GetExternalLoginInfoAsync();
}
Here I get null entries in the property info.AuthenticationTokens. I need some settings in Kentor.AuthServices (aspnetcorebranch) to support access tokens or something needs to be configured in identityserver4