
eur7v (eur7v) asked a question.
Hi,
I have web server behind the load balancer, system successfully redirected me to OKTA login page, after entering the credentials when I and hitting the login button when OKTA server perform the callback action using
"https://www.mywebservername.com/authorization-code/callback"
I am getting an error "403 - Forbidden: Access is denied." You do not have permission to view this directory or page using the credentials that you supplied.
I am using below code in startup.cs file, my application in Blazor server
.AddOpenIdConnect(options =>
{
options.ClientId = Configuration["Okta:ClientId"];
options.ClientSecret = Configuration["Okta:ClientSecret"];
options.CallbackPath = "/authorization-code/callback";
options.Authority = Configuration["Okta:Issuer"];
options.ResponseType = "code";
options.SaveTokens = true;
options.Scope.Add("openid");
options.Scope.Add("profile");
options.TokenValidationParameters.ValidateIssuer = false;
options.TokenValidationParameters.NameClaimType = "name";
})
.AddCookie();
Can you please help me to fix this problem.
Thanks
Nitin Kumar

Hi Nitin! Are you seeing any errors in your Okta system logs? (Reports -> System Log). There may be more information there on why a 403 is being returned.