is it okay to store the user id in localstorage?
# support-questions
m
is it okay to store the user id in localstorage?
r
So we already have a function in the frontend SDK that you can use to get the user ID. So you don't need to store it in localstorage
m
Yes, but if I want to use it I need to call Supertokens.init() before and that makes the flow a bit annoyig
r
I see. Yea then you can store it. But also don't use it to identify the user to the API. For that, you should use the session tokens. Also, you should ideally figure out one place in your frontend which always gets called on every page and there you should call supertokens.init
m
Can I also use the session tokens for the database where I store my data?
r
im not sure I understand this questino