You can exchange a JWT between the client side and server-side applications to identify the user's "session" - the JWT can contain the authenticated user's ID if available.
Aug 24, 2022
2
Level 1
Store visitor cart data for unregistered and registered users in API, not session
Built an API for an e-commerce app. Need to store cart items while user is not logged in (guest visitors). Could be a custom table for that purpose, or something else. The issue is, what is the standard way to identify a particular visitor to store the data as there is no user_id for unregistered visitors. I will need to store both registered and unregistered user's cart info.
In the web part of my application, session takes care of this. I don't need code example per se, just some ideas on how this particular situation is dealt with. If there is a standard solution. Thanks.
Please or to participate in this conversation.