So I'm currently doing something similar to what was asked IdentityServer3 and external login through OpenIDConnect, except with okta as my external Idp. (tl;dr: I have a local identityserver3 with authenticates to an external Okta Idp via openid Connect).
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 https://localhost:5000/core and in my startup code stub is the following
public static void ConfigureIdentityProviders(IAppBuilder app, string signInAsType){
var openIDOptions = new OpenIdConnectAuthenticationOptions
{
AuthenticationType = "oktaOpenID",
Authority = "https://***********.okta.com",
Caption = "Okta Via OpenID",
ClientId = "<client id>",
ClientSecret = "<client secret>",
RedirectUri = "https://localhost:5000/core",
ResponseType = "code",
Scope = "openid email profile",
SignInAsAuthenticationType = signInAsType
}
}
The issue is with the callback. When i authenthicate against OKTA (my external OICD idp), it redirects to https://localhost:5000/core but the browser prints
{
Message: "The requested resource does not support http method 'POST'."
}
I have a feeling i need to create an endpoint like https://localhost:5000/core/OIDC
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.
Any help? I tried creating a class similar to that defined in IdentityServer3 and external login through OpenIDConnect but i was getting build errors since i don't know what libraries/packages were included in spatialguy's project.