make a network call? If we're building our own frontend UI, how is doesSessionExist() intended to be used? Should I be calling it in every frontend component that needs to know if a session exists? Should I call it and then instead cache the result?
r
rp_st
04/10/2022, 5:40 PM
hey @User it makes a network call only once when a new visitor visits your site, or if you manually clear all the cookies.
You can safely call it each time a component mounts (in
useEffect
and it should be fine)
rp_st
04/10/2022, 5:40 PM
You do not need to cache anything
k
kelbs
04/11/2022, 12:21 AM
Thanks! So besides the first call is it checking for a cookie or something?
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).