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
04/13/2022, 2:33 PM
Yes, but if I want to use it I need to call Supertokens.init() before and that makes the flow a bit annoyig
04/13/2022, 2:35 PM
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
04/13/2022, 2:38 PM
Can I also use the session tokens for the database where I store my data?