1

Hi everyone

Summary:

Our project that we develop uses Identity Server 3 in conjunction with MembershipReboot. We have next login workflow:

  1. Login page (email, password)
  2. 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 via AuthenticateResult and triggers Partial Login mechanism (Partial SignIn Authentication Type)
  3. 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.

Community
  • 1
  • 1
Denys Pelikh
  • 11
  • 1
  • 4

1 Answers1

0

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 like return Task.FromResult(new AuthorizeRequestValidationResult { IsError = true });

danijels
  • 5,211
  • 4
  • 26
  • 36
  • I checked it and got just error page with message something like this _Custom token request validator error_ .I need to somehow skip the **Login page** and go immediately to Partial Login (where is for example 2fa). User does not have to again input their credential (login and password). Maybe I did not see or understand something... – Denys Pelikh Jul 26 '17 at 14:42