<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
System Status
Announcements
Announcements
Search
Search
Select Language
0D51Y00009L7VaiSAFOkta Identity EngineAdministrationAnswered2024-03-15T10:58:46.000Z2020-08-28T15:14:59.000Z2020-08-31T13:41:40.000Z

FarazS.66632 (Customer) asked a question.

I got this error when i use okta authentication Can any body guid me what was the issue

This is my error:

ArgumentException: IDX20108: The address specified 'https://{yourOktaDomain}/oauth2/default/.well-known/openid-configuration' is not valid as per HTTPS scheme. Please specify an https address for security reasons. If you want to test with http address, set the RequireHttps property on IDocumentRetriever to false. (Parameter 'address')

 

InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://{yourOktaDomain}/oauth2/default/.well-known/openid-configuration'.

 

 

this is my code block

 services.AddAuthentication(options =>

   {

    options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme;

    options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;

   })

   .AddCookie()

   .AddOpenIdConnect(options =>

   {

    options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;

    options.Authority = Configuration["Okta:Domain"] + "/oauth2/default";

    options.RequireHttpsMetadata = true;

    options.ClientId = Configuration["Okta:ClientId"];

    options.ClientSecret = Configuration["Okta:ClientSecret"];

    options.ResponseType = OpenIdConnectResponseType.Code;

    options.GetClaimsFromUserInfoEndpoint = true;

    options.Scope.Add("openid");

    options.Scope.Add("profile");

    options.SaveTokens = true;

    options.TokenValidationParameters = new TokenValidationParameters

    {

     NameClaimType = "name",

     RoleClaimType = "groups",

     ValidateIssuer = true

    };

   });

 

   services.AddAuthorization();

 

 

 

 "Okta": {

  "ClientId": "0oasddmtdl6yF2Z0gg44x6",

  "ClientSecret": "clLGJTc6ez1kRKRW6fPvhfn_2odR8_yp9GuqZDQoh_",

  "Domain": "https://dev-4088787390.okta.comDashboard",

  "PostLogoutRedirectUri": "https://ljhocalhost:44395/"

 }

 

 

 

 


This question is closed.
Loading
I got this error when i use okta authentication Can any body guid me what was the issue
Okta Support Agent (Beta)

Terms of Service

Hello! I'm the Okta Support Agent (Beta), your go-to resource for questions about Okta products. Please remember for your security and privacy, do not share any Personally Identifiable Information (PII) such as passwords, IP addresses, or other details with me.

Okta Privacy Policy and Terms of Service apply