Dan Lister Dan Lister - 1 month ago 12
C# Question

Identity Server Partial Login and get the Email Claim

I have a partial login before navigating to a different page before full login occurs. Is there a way to obtain claims within the partial login intermediary page? For example, the email claim.

Within my controller, I can obtain the partial login with the following code:

HttpContext.Current.GetOwinContext().Environment.GetIdentityServerPartialLoginAsync()


Unfortunately, the Claims property on the returned object is always empty until a full login has been completed.

Answer

So it turns out claims aren't present for a partial login. I was able to obtain them from a UserService when composing an AuthenticateResult for Partial Logins.