I’m building an SPA that allows you to like and dislike properties. Part of the requirement is that it is usable without needing an account, but an account can be created using Facebook Auth later in the user flow of the app.
In order to account for the like/dislike state for the user, I’m creating a new user anytime a unique user uses the app. I store this user in a table with a random hash as their uid. I also store this uid in their
localStorage incase they refresh the page. If they decide to use FB Auth then their email would be used inserted into the users table which links them to the uid.
That’s all working nicely, but what I’d like to do is take advantage of the auth session methods so I can reference the current user in controllers without having to pass the users
uid with every request.
Is this possible or am I just dreamin’?