#getLoggedInUser() returning null

14 messages · Page 1 of 1 (latest)

atomic hound
#

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

next oar
#

can you share the code?

atomic hound
#

yeah sure there it is

next oar
atomic hound
#

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

atomic hound
#

yep 😀

next oar
# atomic hound yep 😀

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

#

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

atomic hound
#

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

next oar
#

i think you should try this to get the current session:

account.getSession("current")
next oar
next oar
atomic hound
#

ithink the getSession doesnt work but at least ive got a lead to explore ! thanks