How to support anonymous sessions and allow action...
# ktor
m
How to support anonymous sessions and allow actions such as items to be added to cart
a
Can you explain what the anonymous sessions are?
allow actions such as items to be added to cart
Can you describe your problem in terms of HTTP?
m
When I open temu.com it allows me to add items to cart even though I didn’t register or login to the website. At the point of checkout it asks to sign in using sms code.
If the browser is closed and re opened the items in the cart are still available. So it seems it is opening a session by default and later allowing to attach the session to a user account
On a different browser, I open the website again and add items to cart. And then sign in using sms code. Now I see two items in cart
a
You can use the Sessions plugin to store the session in browser's cookies to implement that. You can configure the cookies's lifetime to make sure that they aren't dropped after closing the browser.