Giter Site home page Giter Site logo

Comments (5)

laura-rodriguez avatar laura-rodriguez commented on June 11, 2024

Hi @jabil-rg02,
We apologize for the inconvenience. The Configuration object maps configuration from different providers (i.e Env Vars, JSON files, etc). Maybe your appsettings.json is being overwritten by something else. Can you debug the following code in your Startup class to verify what is mapped to your Okta values?

   .AddOktaMvc(new OktaMvcOptions
            {
                // Replace these values with your Okta configuration
                OktaDomain = Configuration.GetValue<string>("Okta:OktaDomain"),
                ClientId = Configuration.GetValue<string>("Okta:ClientId"),
                ClientSecret = Configuration.GetValue<string>("Okta:ClientSecret"),
            });

https://github.com/okta/samples-aspnetcore/blob/master/okta-hosted-login/okta-aspnetcore-mvc-example/Startup.cs#L43.

Also, as a workaround, you can try to assign those values directly in the Startup class:

image

In case you don't know, you can test common scenarios quickly with our ASP.NET samples:

I hope this helps.

from okta-aspnet.

jabil-rg02 avatar jabil-rg02 commented on June 11, 2024

I wasn't able to get that example working. I modified the Visual Studio template to work with Okta defaults and provided some screen shots on the readme.md. Feel free to pull the code example and use, I've checked it in to github for our purposes.

Thank You!

from okta-aspnet.

laura-rodriguez avatar laura-rodriguez commented on June 11, 2024

Hi @jabil-rg02 ,

Have you tried to assign those values directly as I showed you above?

Not sure if the secrets you've posted in the appsettings file in the PR are the ones you are using now, but if so, I highly recommend you to invalidate them. As apparently is the OktaDomain which is failing there's no need to test it with valid client id/secret :).

I've pulled your PR but it has multiple compiling errors. I recommend you to test this using one of our ASP.NET samples instead of the IT projects we have in the ASP.NET solution. Keep it simple, you can remove all the Azure code for now, to narrow down the issue.

I'd be happy to review this again & help you fixing this issue.

from okta-aspnet.

laura-rodriguez avatar laura-rodriguez commented on June 11, 2024

Also, can you give more background of how is your Login flow?

from okta-aspnet.

jabil-rg02 avatar jabil-rg02 commented on June 11, 2024

I included screenshots in the pull request. The readme file shows all the Okta settings and the code example running

from okta-aspnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.