Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw error if GRAPHQL_JWT_AUTH_SECRET_KEY has not been added to wp-config.php #91

Open
joshuaiz opened this issue Apr 27, 2020 · 2 comments

Comments

@joshuaiz
Copy link

Currently, if GRAPHQL_JWT_AUTH_SECRET_KEY is not set in wp-config.php it causes an internal server error with WPGraphQL and prevents the schema from loading.

Failing to add the key in wp-config.php should present an error in the admin and probably not disable the schema.

@jonshipman
Copy link

Of note: there's also the filter graphql_jwt_auth_secret_key. I propose the plugin, by default, should use a filter that returns the constant SECURE_AUTH_KEY. Would be as secure as the WordPress install itself and would allow the plugin to "work out of the box" while still allowing for custom keys set in functions and wp-config.

@therealgilles
Copy link

I've experienced the same issue. It does not seem right that installing a plugin would result in PHP errors that break a WP site (mine is live).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants