Skip to main content

Current logged In user

  • June 29, 2022
  • 3 replies
  • 1649 views

I am developing a board view using react and I have used the quickstart react js code. I am unable to get the current user logged in userId.

With this query : -

query { me { id, name } }

Every time it is giving me the same result (User who has generated the authentication token and configured the app)

Note : - The app is yet to published.

@dipro @basdebruin

Please help.

3 replies

basdebruin
  • Community Expert
  • June 29, 2022

hi @expert.monday

That is expected because the code runs with the token you provided and that token contains the userId. For an integration it is simple as the trigger contains the userId from the user that initiated the action (e.g. status change). I do not have much experience with views, but I am sure there is a likewise solution for that. Is the userId (for the current user) not found in the state?


  • Author
  • New Participant
  • June 29, 2022

No, Is it because we are hardcoding the token in env ?


basdebruin
  • Community Expert
  • June 29, 2022

I don’t think it is relevant where you store the token. The token represents a user, and it is that user that is used for the action executed.