<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z0000A9m70yCQAOkta Classic EngineAuthenticationAnswered2024-06-21T14:02:39.000Z2024-06-19T22:49:52.000Z2024-06-21T14:02:39.000Z
OktaMvc redirect_uri authentication error

I am trying different integration options with Okta and my dotnet core 6.0 web application.

 

I am receiving this error message:

 

Error: The 'redirect_uri' parameter must be a Login redirect URI in the client app settings: https://dev-945062-admin.okta.com/admin/app/oidc_client/instance/0oa14txmlk8FXs4wQ358*tab-general

 

In the app, I have added Okta authentication as below. Added appropriate handler for Account/signin. I get the error after a successful signin into Okta. Perhaps I miss configured some settings. Any help/suggestion to troubleshoot/fix this will be highly appreciated.

 

builder.Services.AddAuthentication(options =>

{

  options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;

  options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;

  options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;

 

})

.AddCookie(options =>

{

  options.LoginPath = new PathString("/Account/SignIn");

})

.AddOktaMvc(new OktaMvcOptions

{

  // Replace these values with your Okta configuration

  OktaDomain = builder.Configuration.GetValue<string>("Okta:OktaDomain"),

  ClientId = builder.Configuration.GetValue<string>("Okta:ClientId"),

  ClientSecret = builder.Configuration.GetValue<string>("Okta:ClientSecret"),

  AuthorizationServerId = builder.Configuration.GetValue<string>("Okta:AuthorizationServerId"),

  Scope = new List<string> { "openid", "profile", "email" },

});

 

Thanks,

Muhammad Piracha

 

 


This question is closed.
Loading
OktaMvc redirect_uri authentication error