-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Mutations with authorization header gives 500 error #660
Comments
@vorasudh What version of WPGraphQL JWT Authentication are you using? |
@kidunot89 I am using v0.5.2 of WPGraphQL JWT Authentication |
@vorasudh Are you testing this in a GraphQL client? |
@kidunot89 Yes, i am using Apollo client in my NextJS project. |
After days of debugging, it turns out that my .htaccess file already had a configuration to redirect auth header so WP can access it. And I was adding it again - Once I removed |
Describe the bug
I am facing issues when a logged-in customer is trying to add to cart or checkout. I am using WPGraphQL JWT Authentication for authentication. I receive
authToken
,refreshToken
andsessionToken
. When I try to make any mutation with theauthorization
andwoocommerce-session
header, the call fails with error code 500 with this message:<p>There has been a critical error on this website.</p><p><a href=\"https://wordpress.org/support/article/faq-troubleshooting/\">Learn more about troubleshooting WordPress.</a></p>
.Unfortunately, enabling debugging does not provide any logs in response to the mutation.
So basically a logged-in user cannot add a product to a cart (mutation: addToCart) and cannot checkout (mutation: checkout). I have looked at many previous issues (#88, #147, #297, #320), but nothing is solving my problem here. Maybe I missed some configuration here. Can someone please guide me?
Plugin Versions
The text was updated successfully, but these errors were encountered: