funkhaus / wp-graphql-cors

Makes WP GraphQL's authetication "just work". It does this by customizing the CORS headers.
GNU General Public License v3.0
112 stars 21 forks source link

Login Mutation ends in internal server error #8

Closed henrikwirth closed 4 years ago

henrikwirth commented 4 years ago

When I activate the login mutation and query like so:

mutation LoginUser($input: LoginInput!) {
  login(input: $input) {
    status
  }
}

I end up getting an internal server error:

{
  "error": {
    "errors": [
      {
        "debugMessage": "You cannot register duplicate fields on the same Type. The field 'login' already exists on the type 'rootMutation'. Make sure to give the field a unique name.",
        "message": "Internal server error",
        "category": "internal"
      }
    ]
  }
}

There already is a login mutation from WPGraphQL, so this is a bit confusing.

Also when I set credentials: 'include' it works if I set the allowed Domains to my localhost, but it doesn't set any Cookies.

drewbaker commented 4 years ago

@henrikwirth I made a lot of updates to this yesterday, update your version to the latest. You will need credentials: 'include' set.

kidunot89 commented 4 years ago

My bad :man_facepalming: I'll fixed it immediately