wp-graphql-polylang
wp-graphql-polylang copied to clipboard
Cannot query viewer when logged in other source than the cms
Hi!
I have an encountered an issue when I was trying to fetch the currently logged in user through the viewer
query.
I have Polylang v2.8.4, WP GraphQL Polylang v0.5.0 enabled. My authentication plugin is WPGraphQL JWT Authentication v0.4.1.
Steps to reproduce:
- Log in through mutation query. Get back jwt token. No issue here at all.
- Pass jwt token as Bearer in authentication header for the
viewer
query. The query looks like this:
query getViewerCollections {
viewer {
name
email
}
}
The server response is 403 forbidden and:
{
"data": {
"viewer": null
}
}
When I disable the WP GraphQL Polylang plugin then everything works as intended.
Any ideas on why this might happen?