title: Changing B2C Reply URL from "signin-oidc" to something else does not work
body: <p>I am trying to get a <strong>ASP.NET Core 2.1</strong> web app running with Azure AD B2C.
  I have this running after much reseach (and more trial and error) as the instructions found in the docs are a little off.</p>
  
  <p>The sign-in/sign-up process works using the default scaffolding during the project setup wizard, plus the new <strong>Microsoft.AspNetCore.Authentication.AzureADB2C.UI</strong> Nuget, which resulted in a simplified, yet "back boxed" experience during startup.</p>
  
  <p><strong>The problem currently is that I am unable to make this work with a custom Reply URL that is different from "signin-oidc".</strong> I have read that "signin-oidc" is baked into the provider somehow, and is hence the default.</p>
  
  <p>I have a <code>OnboardingController</code> with a <code>Start</code> action defined where I want the user to land after signing up, so I have done the following:</p>
  
  <ul>
  <li>A) I tested that the Url <code>localhost:12345/Onboarding/Start</code> works. The
  page is displayed correctly.</li>
  <li>B) In appsettings.json I change AzureAdB2C's <code>"CallbackPath": "/signin-oidc"</code> to <code>"CallbackPath": "/Onboarding/Start"</code>
  <a href="https://i.stack.imgur.com/U0zDO.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/U0zDO.jpg" alt="appsettings"></a></li>
  <li><p>C) I go to the tenant and change the application's Reply URL to <code>localhost:12345/Onboarding/Start</code>. <em>IMPORTANT side note: Unlike in the ADB2C samples and guides, you MUST append the Reply URL with either signon-oidc or a custom request path! Localhost:12345 is NOT ENOUGH!</em>
  <a href="https://i.stack.imgur.com/iqTwo.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/iqTwo.jpg" alt="tenant config"></a></p>
  
  <p>I can confirm the authentication worked:
  Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler:Information: AuthenticationScheme: AzureADB2CCookie signed in.
  Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request finished in 56.201ms</p></li>
  </ul>
  
  <p>Then, when I manually navigate to /Onboarding/Start in the browser, I get </p>
  
  <blockquote>
    <p>Error from RemoteAuthentication: Correlation failed.</p>
  </blockquote>
  
  <pre><code>Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request starting HTTP/1.1 GET http://localhost:12345/Onboarding/start  
  Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler:Warning: .AspNetCore.Correlation. state property not found.
  Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler:Information: Error from RemoteAuthentication: Correlation failed..
  </code></pre>
  
  <p><strong>1. 
  But I am never redirected to the intendend /Start page. instead I land back on the root homepage, just like what happens when I used 'signin-oidc'. Why is that and how do I make it stop going there?</strong></p>
  
  <p><strong>2. How can I have the Reply URL be different depending on whether you sign IN or UP? I can't really use a sign-up policy for one and a separate sign-in policy for the other, because the reply URL is identical.</strong></p>
  
  <p>I am new to .Net Core and I am at a loss as to how to even debug this. Signing in with B2C seems to be an obscure process. Any insight would be greatly appreciated.</p>
  
  <p>EDIT:
  This is the custom account controller, which is not built into the Nuget package for AzureADB2C.
  While the Nuget package provides an internal AccountController, it does not allow you to set a custom Reply URL. Yet using my own account controller does not work for me. I am also not getting the "Correlation failed" error either, instead I get no error at all.</p>
  
  <pre><code>[Route( "[controller]/[action]" )]
      public class AccountController : Controller
      {
          private readonly AzureADB2COptions azureAdB2COptions;
          private const string PolicyAuthenticationProperty = "Policy";
          private string scheme = AzureADB2CDefaults.AuthenticationScheme;
  
          public AccountController( IOptions&lt;AzureADB2COptions&gt; b2cOptions )
          {
              azureAdB2COptions = b2cOptions.Value;
          }
  
          [HttpGet]
          [Route( "/[controller]/SignIn" )]
          public IActionResult SignIn()
          {
              var callbackUrl = Url.Action( nameof( OnboardingController.Start ), "Onboarding", values: null, protocol: Request.Scheme );
              var properties = new AuthenticationProperties { RedirectUri = callbackUrl };
              properties.Items[PolicyAuthenticationProperty] = azureAdB2COptions.SignUpSignInPolicyId;
  
              return this.Challenge( properties, scheme );
          }
  </code></pre>
  
  <p>The startup.cs code for B2C is unchanged from what the default .NETCore 2.1 template generated for me:</p>
  
  <pre><code>    services.AddAuthentication( AzureADB2CDefaults.AuthenticationScheme )
          .AddAzureADB2C( options =&gt;
          {
              Configuration.Bind( "AzureAdB2C", options );
          } );
  </code></pre>