Open Closed

OAuth for Swagger Problem #2304


User avatar
0
serdar.genc@talentra.net created

I want to use OAuth for Swagger. According to the document in the link below, I implemented the following:

https://docs.abp.io/en/abp/latest/API/Swagger-Integration#using-swagger-with-oauth

But the result I got is this:

500 Internal Server Error INVALID_REQUEST Invalid redirect_uri


Is the document missing, how can I solve this problem?

  • ABP Framework version: v5.0.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

3 Answer(s)
  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    You need to create MyApplication_Swagger client in your database with related grant_type and redirect uri. In DbMigrator project, check the IdentityServerDataSeeder file and add your swagger application like others. If you check the CreateClientAsync method, it reads the root url from appsettings, so you need to update dbmigrator appsettings.json as well.

  • User Avatar
    0
    serdar.genc@talentra.net created

    https://github.com/abpframework/abp-samples

    Which sample application can I follow?

  • User Avatar
    0
    serdar.genc@talentra.net created

    handle it. thanks.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11