What is the optimal flow for guest to user functionality
So I'm building an app with the t3 stack where users can create itinerary's and I want guests (people not signed in) to be able to as well, but their's won't be saved if they don't sign in.
Current semi-implementation is to create the itinerary on the client and save it to sessionStorage. I'm rendering the guest itinerary on a different page than the user itinerary page. Then when a guest returns from sign in (OAuth provider), take what's in sessionStorage, navigate them to the actual user itinerary page, create it in the backend, wait for response, and then render it. I feel like there must be a better approach.
What's the best way to go about this? Is it okay to save guest data in the db temporarily?
Current semi-implementation is to create the itinerary on the client and save it to sessionStorage. I'm rendering the guest itinerary on a different page than the user itinerary page. Then when a guest returns from sign in (OAuth provider), take what's in sessionStorage, navigate them to the actual user itinerary page, create it in the backend, wait for response, and then render it. I feel like there must be a better approach.
What's the best way to go about this? Is it okay to save guest data in the db temporarily?
