Jump to content

damien113

Member
  • Posts

    3
  • Joined

  • Last visited

Everything posted by damien113

  1. I am having a really hard time getting OpenIDConnect to work properly with this asp.net 4.6 mvc 5 project. Recently I was getting a 404 error and ended up adding a custom route to the callback action to get it to work past that. AFter that I started getting a error about GetExternalLoginInfoAsync() returning null and getting a nullreferenceexception. This is what my config looks like with some things redacted, along with the routing. Also the image provided is one of the errors I get,if i dont use custom routing i just get a 404 error. If anyone has a sample project connecting to WHMCS with OpenID Connect in C# with Owin, let me know. OpenIdConnect nonce cookie is there, along with session ID, also in the URL it is sending the state and the code which is below. https://localhost:44348/signin-oidc/?code=e33dab0ae5e9640ef731c460180780092703727b&state=OpenIdConnect.AuthenticationProperties%3D-JlLC-VdZi-KZst8OY4JikRrl59vm19HATAcOaqUv8a22U8ch9gC_IJARHlsvaDKZQrqfeTewtdk5d-KcZSrUR3qCoJVcmzNRDP8C0JJ2NH9ql42J3H1xkxEzoAvJ0wxITy-tCj5H-N-bYhMZbO4kB8s2S4msCF0kEDzgipoPmGfZfreUeyYcerwK_OJGH3uYKUYa1NjqA0G-hlhiYpUj8DUp59EXpDz6sr1wtohTiI Code var json = ""; using (WebClient wc = new WebClient()) { json = wc.DownloadString("http://orders.data443.com/oauth/openid-configuration.php"); } var settings = new OpenIdConnectAuthenticationOptions { Authority = "https://orders.data443.com/oauth/", ClientId = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", ClientSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", RedirectUri = "https://localhost:44348/signin-oidc/", CallbackPath = new PathString("/signin-oidc/"), Configuration = new OpenIdConnectConfiguration(json), ResponseType = OpenIdConnectResponseType.Code, SignInAsAuthenticationType = "Cookies", TokenValidationParameters = new TokenValidationParameters { ValidateIssuer = false, }, Scope = "openid email profile" }; app.UseOpenIdConnectAuthentication(settings); Routing routes.MapRoute( name: "signin-oidc", url: "signin-oidc", defaults: new { controller = "Account", action = "ExternalLoginCallback" }); [1]: https://i.stack.imgur.com/ZT4aT.png
  2. Also yes, the account is a full admin.
  3. I am using the WHMCS External API and can no get it to work. I have the IP whitelisted and tokens created. I have tried both links https://orders.websitename.com/api.php?action=GetClientsProducts&identifier=identifier_key&secret=secret_key https://orders.websitename.com/api.php?action=GetClientsProducts&username=user@company.com&password=password!&accesskey=secret_key they have both returned <?xml version="1.0" encoding="utf-8"?> <whmcsapi version=""> <action>getclientsproducts</action> <result>error</result> <message>An admin user is required</message> </whmcsapi>
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated