Skip to content

[Bug]: GraphQL Data Source with OAuth 2.0 Authentication does not authenticate #2052

@Timbo10000

Description

@Timbo10000

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I added a GraphQL data source with authentication type oauth 2.0.

Image

I have an API that also authenticates with the same oauth provider.

When I try to test it with a query I get an error:
query1 run failed: {"code":"HTTPUNAUTHORIZED","message":null}
{ "errors": [ { "message": "Invalid user credentials.", "extensions": { "code": "INVALID_CREDENTIALS" } } ] }

Image

If I use a normal bearer token it works.

Expected Behavior

Lowcoder should forward the user’s OIDC access token when “OAuth 2.0 (Inherit from login)” is selected as the authentication type, allowing the API to verify and authorize the request based on the same user identity and group claims.

Steps to reproduce

  1. Configure lowcoder to use an external OAuth provider for authentication.
  2. Set up the API with the same OAuth provider.
  3. Setup a data source with the API and “OAuth 2.0 (Inherit from login)” activated.
  4. Try to fetch data from the API.
  5. Get the error

Environment

OS: Ubuntu 24.04
Lowcoder Version: lowcoder-ce:2.7.5

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Javascript FrontendPull requests that update Javascript code

    Type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions