api-manager icon indicating copy to clipboard operation
api-manager copied to clipboard

Intermittent Hanging When Generating Access Tokens With Scopes

Open ashanhr opened this issue 10 months ago • 1 comments

Description

Generating access tokens with scopes hangs indefinitely. generate-token request is not sent, only the oauth-keys request is sent. oauth-keys request status is 200 and following is the reference. Also a screenshot is attached below.

{
    "count": 1,
    "list": [
        {
            "keyMappingId": "fc5f3249-8844-4041-920f-7d19752608f4",
            "keyManager": "Resident Key Manager",
            "consumerKey": "xcr7uosPLedFby9BMSfwFsEM7TEa",
            "consumerSecret": "86ZkoGtesVHWCNGk8QBTtsU9uMoa",
            "supportedGrantTypes": [
                "password",
                "client_credentials"
            ],
            "callbackUrl": "",
            "keyState": "COMPLETED",
            "keyType": "PRODUCTION",
            "mode": "CREATED",
            "groupId": null,
            "token": {
                "accessToken": null,
                "tokenScopes": [],
                "validityTime": 0
            },
            "additionalProperties": {
                "id_token_expiry_time": 3600,
                "application_access_token_expiry_time": 3600,
                "user_access_token_expiry_time": 3600,
                "bypassClientCredentials": false,
                "pkceMandatory": false,
                "pkceSupportPlain": false,
                "refresh_token_expiry_time": 86400
            }
        }
    ]
}
Image

Steps to Reproduce

  1. Subscribe to an API an try to generate an access token with scopes.

Version

4.5.0-alpha

Environment Details (with versions)

No response

ashanhr avatar Feb 19 '25 04:02 ashanhr

Attempted to reproduce the issue in the 4.5.0 pack (using Resident KM) but was unable to replicate the reported bug.

Upon reviewing the code, clicking the "Generate Access Token" button triggers generateAccessToken() in ViewKeys.jsx, which internally calls application.generateToken(). This is likely where the inconsistent behavior occurs.

Additionally, the issue could be related to network instability.

RusJaI avatar Mar 23 '25 20:03 RusJaI