Back

getLoggedInUser() returning null

  • 1
  • Functions
  • Web
  • Cloud
SerialFisher56
25 Aug, 2024, 14:10

Hi,

I have been able to set data into appwrite , i also can sign in but for some reason when i use the getloggedinuser function to retrieve some of the data and display it it always comes back as null and I am a bit confused as to why and what to do.

if anyone asseen this before please let me know

TL;DR
Developers trying to retrieve data using getLoggedInUser() function, but it always returns null. Discussion around potential session initialization issues and code sharing. User struggling due to being new to the task.
be4st
25 Aug, 2024, 14:35

can you share the code?

SerialFisher56
25 Aug, 2024, 14:39

yeah sure there it is

be4st
25 Aug, 2024, 14:41

may i know what are you doing inside createSessionClient()?

SerialFisher56
25 Aug, 2024, 14:44

i am not sure about that i have been trying to follow the docs on their website but im kind of new with this

be4st
25 Aug, 2024, 14:44

can u share it?

SerialFisher56
25 Aug, 2024, 14:46

yep 😀

be4st
25 Aug, 2024, 14:52

i think the session is not beign set properly or the client is not getting initialized properly..

be4st
25 Aug, 2024, 14:54

can u also share what error is beign logged in the console?

SerialFisher56
25 Aug, 2024, 14:58

looks like you are actually right the session isnt being done properly

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more