Open Closed

swagger api login with oidc gives 400 error #10367


User avatar
0
sghorakavi@cpat.com created

Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage.

Provide us with the following info: 🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration button.

  • Exception message and full stack trace:
  • Steps to reproduce the issue: Need help to fix this issue.
  • I have below value in json file
  • "OpenIddict": { "SwaggerRootUrl": "https://localhost:44320/portal/api", "Applications": { "Approach_Web": { "ClientId": "Approach_Web", "ClientSecret": "1q2w3e*", "RootUrl": "https://localhost:44386", "WildCardRootUrl": "https://{0}.dev.cpat.dev:44386" }, "Approach_App": { "ClientId": "Approach_App" }, "Approach_Swagger": { "ClientId": "Approach_Swagger", "RootUrl": "https://localhost:44320/portal/api", "RedirectUris": "https://localhost:44320/portal/api/swagger/oauth2-redirect.html", "ResponseType": "code", "Scope": "email openid profile roles" } } }

var configurationSection = _configuration.GetSection("OpenIddict:Applications"); //Web Client var webClientId = configurationSection["Approach_Web:ClientId"]; if (!webClientId.IsNullOrWhiteSpace()) { var webClientRootUrl = configurationSection["Approach_Web:RootUrl"]!.EnsureEndsWith('/'); /* Approach_Web client is only needed if you created a tiered * solution. Otherwise, you can delete this client. */ await CreateApplicationAsync( applicationType: OpenIddictConstants.ApplicationTypes.Web, name: webClientId!, type: OpenIddictConstants.ClientTypes.Confidential, consentType: OpenIddictConstants.ConsentTypes.Implicit, displayName: "Web Application", secret: configurationSection["Approach_Web:ClientSecret"] ?? "1q2w3e*", grantTypes: new List<string> //Hybrid flow { OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.Implicit }, scopes: commonScopes, redirectUris: new List<string> { $"{webClientRootUrl}signin-oidc" }, postLogoutRedirectUris: new List<string> { $"{webClientRootUrl}signout-callback-oidc" }, clientUri: webClientRootUrl, logoUri: "/images/clients/aspnetcore.svg" ); } Get error:


28 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can create a new question for webservice

    Thanks.

  • User Avatar
    0
    sghorakavi@cpat.com created

    [maliming] said: hi

    You can create a new question for webservice

    Thanks.

    Sure, I will create another tkt for web service

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.2.0-preview. Updated on January 30, 2026, 08:56
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.