title: Azure B2C authentication redirects locally, but not when hosted on Azure
body: <p>I'm new to Azure AD B2C. I'm trying to set up azure B2C authentication for an MVC application.
  The login works fine locally, but when it's not working on server.
  The application is hosted on Azure AD.
  I don't know if I missed something!! Can someone please help?</p>
  
  <pre><code>private OpenIdConnectAuthenticationOptions CreateOptionsFromPolicy(string policy)
          {
              return new OpenIdConnectAuthenticationOptions
              {               
                  // set the authentication type to the id of the policy
                  MetadataAddress = metaDataAddress,
                  AuthenticationType = policy,
                  // These are standard OpenID Connect parameters, with values pulled from web.config
                  ClientId = clientId,             
                  //ClientSecret = clientSecret,
                  RedirectUri = redirectUri,
                  PostLogoutRedirectUri = redirectUri,
                  Notifications = new OpenIdConnectAuthenticationNotifications
                  {
                      AuthenticationFailed = AuthenticationFailed,
                  },
                  Scope = "openid",
                  ResponseType = "id_token",
  
                  //  used for displaying the user's name in the navigation bar.
                  TokenValidationParameters = new TokenValidationParameters
                  {
                      NameClaimType = "name",
                      RoleClaimType = "role",
                      SaveSigninToken = true 
                  }
              };
          }
  </code></pre>
  
  <p>When it is deployed on to the server, after sign in, it is not returning to the application. Instead the page seems to blink and in between I can see something displayed as "As part of the authentication process the page is displayed several times, please click the button to continue"..</p>