https://supertokens.com/ logo
check if user is signed in
o

OlehHlova

05/23/2023, 10:48 AM
Here I see logout function. But have can I check is user signed in or not when I get success on SignIn or SignUp submit?

https://cdn.discordapp.com/attachments/644849840475602944/1110519717468311562/Screenshot_2023-05-23_at_13.45.17.png

o

OlehHlova

05/23/2023, 10:55 AM
Thank you for being in touch! But I need React Native solution. Does it exist?
r

rp

05/23/2023, 10:55 AM
yes. Click on custom UI
on the top right
and you will see mobile code tabs'
o

OlehHlova

05/23/2023, 11:07 AM
Thanks! What I receive when I call this function? An object with some properties: _h, _i, _j, _k what do they mean?

https://cdn.discordapp.com/attachments/1110519717623496805/1110524309660770314/Screenshot_2023-05-23_at_14.04.47.png

r

rp

05/23/2023, 11:08 AM
can i see your code?
o

OlehHlova

05/23/2023, 11:10 AM
sure

https://cdn.discordapp.com/attachments/1110519717623496805/1110525096252166165/Screenshot_2023-05-23_at_14.09.23.png

https://cdn.discordapp.com/attachments/1110519717623496805/1110525170323566682/Screenshot_2023-05-23_at_14.04.47.png

r

rp

05/23/2023, 11:10 AM
you need to use
await
in front of
doesSessionExist
o

OlehHlova

05/23/2023, 11:15 AM
no, in 18th line Im just calling function, but in 15th - it is declared
and in 16th you can notice reutrn await SuperTokens.doesSessionExist();
with "await"
r

rp

05/23/2023, 11:16 AM
so you also need to add await when calling your own function
cause it's async
o

OlehHlova

05/23/2023, 11:30 AM
still getting the same...

https://cdn.discordapp.com/attachments/1110519717623496805/1110530277433950322/Screenshot_2023-05-23_at_14.30.12.png

https://cdn.discordapp.com/attachments/1110519717623496805/1110530277840801884/Screenshot_2023-05-23_at_14.30.26.png

Okay, I think, I've get it, this is a promise wrapper
r

rp

05/23/2023, 11:41 AM
you should read up on promises and JS 🙂