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

Cannot query viewer when logged in other source than the cms #37

Open
philip-akerfeldt opened this issue Nov 20, 2020 · 0 comments
Open

Comments

@philip-akerfeldt
Copy link

philip-akerfeldt commented Nov 20, 2020

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:

  1. Log in through mutation query. Get back jwt token. No issue here at all.
  2. 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?

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

1 participant