Download the PHP package nextagencyio/graphql_oauth_fix without Composer

On this page you can find all versions of the php package nextagencyio/graphql_oauth_fix. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package graphql_oauth_fix

GraphQL OAuth Fix Module

Overview

This custom module fixes OAuth integration with GraphQL in Drupal 11 by providing OAuth-aware access checks for GraphQL requests. It addresses the integration issue between Simple OAuth 6.0 and GraphQL where OAuth bearer token authentication doesn't properly establish user context for GraphQL access checks.

Problem Description

In Drupal 11 with Simple OAuth 6.0 and GraphQL Compose, OAuth bearer token authentication works correctly (tokens are generated and validated), but the GraphQL access check system doesn't recognize the authenticated user context. This results in OAuth-authenticated requests being treated as anonymous requests, causing "permission required" errors even when valid bearer tokens are provided.

Solution

This module provides:

  1. OAuthAuthenticationSubscriber: An event subscriber that detects GraphQL requests with OAuth bearer tokens and stores the authenticated user context in request attributes.

  2. OAuthAwareQueryAccessCheck: A custom access check service that overrides the default GraphQL query access check to properly handle OAuth-authenticated users by:
    • Checking the current user service for authenticated users
    • Looking for OAuth authentication flags in request attributes
    • Using the OAuth-authenticated account for permission checks

Technical Details

Event Subscriber

Access Check Override

Configuration

No additional configuration is required. The module automatically:

Status

Implemented: OAuth-aware GraphQL access checks ✅ Working: GraphQL permission system recognizes OAuth authentication ⚠️ Pending: Simple OAuth 6.0 scope configuration requires additional setup

Known Issue: Simple OAuth 6.0 Scope Requirements

Simple OAuth 6.0 requires scope parameters even when scopes are disabled in configuration. This is a separate OAuth server configuration issue, not related to the GraphQL integration fix provided by this module.

Workaround: Configure appropriate OAuth scopes or use alternative OAuth flow.

Usage

Once enabled, OAuth-authenticated GraphQL requests will work correctly:

Dependencies

Author

Created for DrupalX project to resolve OAuth + GraphQL integration issues in Drupal 11.


All versions of graphql_oauth_fix with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
drupal/core Version ^11.0
drupal/graphql Version ^4.0
drupal/simple_oauth Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nextagencyio/graphql_oauth_fix contains the following files

Loading the files please wait ....