Benjiii's avatar

Access to client-side shoppingcart from Mobile-App (Cordova)

Hello,

currently I have the following problem:

We have a mobile app (JS) through which the user can manage a shopping cart and a wishlist. Both should be stored on the servers-database (client-side) WITHOUT previous user authentication.

The authentication of the user will be done later by Laravel Passport, if the user wants it.

My problem is that I don't know how to assign the shopping cart to the users-device without user authentication.

Session-cookies are not possible because it is an app.

My idea was to generate a client token on the first server request and store it in the app (localStorage or SQLite). With this token I can assign the shopping cart etc. to the users-device by sending it with every requests header.

An other idea is to utilize the device-UUID. But I am not sure if the UUID is unique enough.

Does anyone have experience with such a thing? Thank you.

Kind regards, Benjamin

0 likes
0 replies

Please or to participate in this conversation.