graphql-authentication icon indicating copy to clipboard operation
graphql-authentication copied to clipboard

Craft::$app->getUser()->getIdentity() return null even if the user is login.

Open jesuismaxime opened this issue 7 months ago • 1 comments

Once the user is logged through the GQL mutation, I need to validate that a User exist into a custom PHP Module. Even tho the mutation is successful (JSON response), the Craft's native Craft::$app->getUser()->getIdentity() return null.

Notes:

  • the action where I called my PHP Module is done after the Authenticate mutation (and only when it's successful.
  • I tried to push to Token to my action to performed a getUserFromToken in the backend, but the function do not accept a string, so this was a dead end.

jesuismaxime avatar Jan 08 '24 22:01 jesuismaxime