phrased another way, is my backend supposed to query /sessions/whoami?
j
jolly-tiger-57705
04/11/2022, 7:38 AM
I think the only ways is to query whoami. The cookie is httponly, so you won't be able to access it.
m
magnificent-energy-493
04/11/2022, 9:52 AM
Janek is correct here. You need to call whoami.
j
jolly-tiger-57705
04/11/2022, 9:55 AM
I think login and registration API returns id info, you can save it in localstorage and check it before doing whoami. This could speed up discovering if the user is logged in.
m
magnificent-energy-493
04/11/2022, 10:01 AM
Yea you can use some caching or local storage strategies to reduce the amount of calls you make to Kratos!
/ We do not have documentation for this however (yet!)