graphql-authentication
graphql-authentication copied to clipboard
Craft::$app->getUser()->getIdentity() return null even if the user is login.
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.