A WordPress plugin that enables WordPress authentication cookies to work with WP GraphQL by configuring CORS headers.
WP GraphQL CORS is a WordPress plugin that configures CORS headers to make WordPress authentication work seamlessly with the WP GraphQL plugin. It solves the problem of accessing authenticated data, such as draft posts and private pages, through GraphQL requests by allowing WordPress cookies to be accepted. This enables developers to build frontend applications that interact securely with a WordPress backend.
WordPress developers building headless or decoupled frontends using WP GraphQL, who need to handle user authentication and access protected content via GraphQL APIs.
Developers choose this plugin because it simplifies authentication setup by automatically handling CORS configurations, eliminating manual header adjustments. Its unique selling point is enabling WordPress's built-in cookie authentication to "just work" with WP GraphQL, reducing integration complexity.
Makes WP GraphQL's authetication "just work". It does this by customizing the CORS headers.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically configures CORS headers to accept WordPress authentication cookies, enabling access to protected content like draft posts without manual setup, as highlighted in the README.
Allows multiple frontend domains to connect to a single WordPress backend, facilitating headless architectures with distributed frontends, as noted in the features list.
Offers cookie filtering options to enhance security by controlling which cookies are permitted in GraphQL requests, providing granular control as described.
Adds login and logout mutations to WP GraphQL, simplifying the implementation of frontend authentication flows, with examples provided in the documentation.
Requires the WP GraphQL plugin to be installed and active, creating a dependency that might complicate updates or compatibility, as stated in the installation steps.
Focuses solely on cookie-based authentication, lacking built-in support for alternative methods like JWT, which are common in modern web apps and not addressed in the README.
Developers must configure their GraphQL clients (e.g., Apollo) to include credentials, adding an extra step and potential for misconfiguration, as mentioned in the installation guide.