title: How do I configure Okta as an external IDP for identity server through OIDC protocol?
body: <p>So I'm currently doing something similar to what was asked <a href="https://stackoverflow.com/questions/44947506/identityserver3-and-external-login-through-openidconnect">IdentityServer3 and external login through OpenIDConnect</a>, except with okta as my external Idp.
  (tl;dr: I have a local identityserver3 with authenticates to an external Okta Idp via openid Connect).</p>
  
  <p>I'm new to OIDC and identity server 3. My issue has also to do with what to place in the redirectURL. note my local identity server is hosted at <a href="https://localhost:5000/core" rel="nofollow noreferrer">https://localhost:5000/core</a> and in my startup code stub is the following</p>
  
  <pre><code>public static void ConfigureIdentityProviders(IAppBuilder app, string signInAsType){
  
      var openIDOptions = new OpenIdConnectAuthenticationOptions
      {
          AuthenticationType = "oktaOpenID",
          Authority = "https://***********.okta.com",
          Caption = "Okta Via OpenID",
          ClientId = "&lt;client id&gt;",
          ClientSecret = "&lt;client secret&gt;",
          RedirectUri = "https://localhost:5000/core", 
          ResponseType = "code",
          Scope = "openid email profile",
          SignInAsAuthenticationType = signInAsType
      }
  }
  </code></pre>
  
  <p>The issue is with the callback. When i authenthicate against OKTA (my external OICD idp), it redirects to <a href="https://localhost:5000/core" rel="nofollow noreferrer">https://localhost:5000/core</a> but the browser prints</p>
  
  <pre><code>{
      Message: "The requested resource does not support http method 'POST'."
  }
  </code></pre>
  
  <p>I have a feeling i need to create an endpoint like <a href="https://localhost:5000/core/OIDC" rel="nofollow noreferrer">https://localhost:5000/core/OIDC</a></p>
  
  <p>which will accept the post parameters code and state from okta, then pass the code back to the okta token endpoint, but i have no idea where to start.</p>
  
  <p>Any help? I tried creating a class similar to that defined in <a href="https://stackoverflow.com/questions/44947506/identityserver3-and-external-login-through-openidconnect">IdentityServer3 and external login through OpenIDConnect</a> but i was getting build errors since i don't know what libraries/packages were included in spatialguy's project.</p>