okta / okta-sdk-dotnet

A .NET SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
Other
160 stars 100 forks source link

Scopes sent 3 times when using AuthorizationMode.PrivateKey #529

Closed gao-artur closed 7 months ago

gao-artur commented 2 years ago

Hey, I'm using Okta.Sdk v5.3.1. Here is my config

  "Okta": {
    "Client": {
      "OktaDomain": "https://***.com",
      "ClientId": "***",
      "AuthorizationMode": "PrivateKey",
      "Scopes": [
        "okta.apps.manage",
        "okta.groups.manage",
        "okta.logs.read",
        "okta.users.manage"
      ],
      "PrivateKey": {
        ***
      }
    }
  },

And that's what I see in okta logs: scopes repeated 3 times image

bryanapellanes-okta commented 2 years ago

@gao-artur Thanks for reaching out! To help us understand the issue better, please provide more information about your project and what steps to take to reproduce the issue you see. If possible please provide a sample project (a link to a repo is preferred if possible). We'll be happy to help however we can. Thanks again!

gao-artur commented 2 years ago

Sure, I'll prepare simple repro. I'm replacing api token with OAuth for Okta using this tutorial. The bug is not harmful and not causing any problems, I just saw sdk sends all requested scoped 3 time and it looks to me like a bug.

gao-artur commented 2 years ago

@bryanapellanes-okta you can find the reproduce here. Just run and check Fiddler image