Comments (5)
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"),
});
Also, as a workaround, you can try to assign those values directly in the Startup
class:
In case you don't know, you can test common scenarios quickly with our ASP.NET samples:
- https://github.com/okta/samples-aspnetcore
- https://github.com/okta/samples-aspnet
- https://github.com/okta/samples-aspnet-webforms
I hope this helps.
from okta-aspnet.
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.
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.
Also, can you give more background of how is your Login flow?
from okta-aspnet.
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)
- Validating Access Token on ClientId HOT 5
- .NET integration returns empty claim HOT 5
- Simplify boilerplate configuration for web and api applicaitons HOT 2
- JwtBearer.dll 3.1.1 vulnerability CVE-2021-34532 HOT 2
- Invalid NuGet dependencies results in immediate crash HOT 3
- Proxy configuration not working ? HOT 4
- OpenIdConnect "OnRedirectToIdentityProvider" event with Custom Event Data not showing up in the Okta Widget on Okta Hosted Login Page HOT 9
- Login flow on Blazor Server Side broken with update to Okta.AspNetCore 4.4.1 from 4.4.0 HOT 5
- setting OktaMvcOptions.PostLogoutRedirectUri does nothing. HOT 5
- MissingMethodException after updating Okta.AspNet and Okta.AspNet.Abstractions on MVC project HOT 4
- IdentityServer3 dependency conflict with Okta's SDK
- Error NETSDK1082 when adding Okta.AspNetCore 4.4.2 to a Blazor WebAssembly app HOT 1
- Convenience methods for authorizing daemon to daemon scopes HOT 1
- Title: 401 response during Web API Cold Start (issue in JwtOptionsBuilder.cs) HOT 1
- Okta.AspNetCore assembly not strongly-named assembly
- Add EventsType OktaWebApiOptions to enable DI support
- Documentation for asnet4x HttpMessageHandler implementation throws exception HOT 1
- .NET Framework WebApi - initial request before signing keys are cached is rejected as unauthorized HOT 10
- Timeline when assemblies will take advantage of .NET8.0 HOT 2
- Okta.AspNetCore 4.6.0 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from okta-aspnet.