Hi everyone
Summary:
Our project that we develop uses Identity Server 3 in conjunction with MembershipReboot. We have next login workflow:
- Login page (email, password)
- Some custom User Service has override
PostAuthenticateLocalAsync
(layer after validation user credentials and before being issued a login cookie for IdentityServer) method which has our business and validation logic. This logic redirects the user to additional page viaAuthenticateResult
and triggers Partial Login mechanism (Partial SignIn Authentication Type) - After success Partial Login passage (via
GetPartialLoginResumeUrlAsync
) and another login process User gets token.
This is all good work and we are happy, but here comes the problem when we need new case.
Question:Our new case requires to restart login process but after Login page, that is from the moment PostAuthenticateLocalAsync
. User does not have to reauthorize and enter credential and go directly to step 2. In other words, we want to get Partial Login again.
How can we do this?
I will be very grateful for any advice and help. Thanks.
You should probably look into implementing your own
ICustomRequestValidator.ValidateAuthorizeRequestAsync
and examine the incoming request. If it turns out you want to re-authenticate, you could do something likereturn Task.FromResult(new AuthorizeRequestValidationResult { IsError = true });