Login generate a guest sessionToken
Describe the bug When a user logs in using the login method from the wp-graphql-jwt-authentication plugin, we expect to receive a sessionToken linked to the user. Instead, the plugin generates a guest session that is not associated with the user.
To Reproduce Steps to reproduce the behavior:
-
Clear all the cache
-
Send a SignIn Mutation
mutation signIn($input: LoginInput!) { login(input: $input) { authToken refreshToken } } -
Get the session token from the response Header
-
Parse it in https://jwt.io/ and you can't see that it's a guest token
Expected behavior We would like to be able to retrieve a user token that is linked to the session, along with the cart merge.
Plugin Versions
- WooGraphQL Version: 0.21.2
- WPGraphQL Version: 1.22.0
- WordPress Version: 9.7.1
- WooCommerce Version: 6.2.7
Additional context If we used the authToken we got from the login method in a customer query we will get the right customer id but the session token will still be link to a guest. (And the guest will change each time we run the query)
We send auth token with (Authorization: Bearer XXX) Header and the sessionToken with (woocommerce-session: Session XX) Header