I'm building an app that could be used by both registered users and visitors. What those users could do, is to upload some files. The difference is that guests' files will be stored temporarily. So I'm trying to design a way to handle user sessions.
As you can see in the image I posted below, for the registered users after login JWT will be stored on the browser's local storage and when user's next request is to list his/her files there will be a variable inside the JWT to tell the server where to look for the user's files (which path).
Here is the sketch on how I imagine it.
What do you think? Any ideas or suggestions will be helpful. Thanks.