#the key is returning undefined when i try to create a jwt

34 messages ยท Page 1 of 1 (latest)

rapid stag
peak laurelBOT
#

๐Ÿ”Ž This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

๐Ÿ•ต๏ธ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

โœ… You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

rapid stag
#

probably because the session took a long time to load and was already direct to useEffect.

near aurora
#

@rapid stag you created a new one - was replying in the previous one

#

sorry I didn't see your code deeply

#

so couple of bugs there

#

so first of all add session to the dependency array of your useEffect

rapid stag
near aurora
#

and in your useEffect check session?.user?.id and return; before making axios call

rapid stag
#

like this?

near aurora
#

yeah, exactly

rapid stag
#

now nothing happens, apparently it stops at the if(!token) return null

near aurora
#

first of all see your backend console if you are getting correct api request

rapid stag
#

lol

#

lmao

near aurora
#

@rapid stag

#

not much following you

#

plz be clear at your communication as I am not familar with your codebase

rapid stag
near aurora
rapid stag
#

sorry anything, I don't speak English very well, I'm using google translator

near aurora
#

no worries

#

so is everything working fine?

rapid stag
#

i will mark as resolved, thank you again!

near aurora
#

sure then close this thread

rapid stag
near aurora