I’m looking to build a page using the autobahnjs library where a user comes to a landing (html/http) page which prompts for logging in. Upon providing username and password, the page will go through the authreq process and authenticate the user. The authreq process itself already works without issues. After this authentication has been successful, the user will be re-directed to various pages on our site so they have access to other features, which we want to leverage the autobahn connection that was initially made for rpc and pubsub.
My question is: once the authentication process has been completed, how is this passed from one page to the next so authentication doesn’t have to be redone every time a new page is loaded?
One option I’m considering using is a shared webworker where the worker handles all autobahn communication, including authentication and rpc calls, and different pages load that worker, so it should store the authenticated info and subsequent pages will have access to it.
Something else we thought was serializing the connection object, but I assume the connection itself would already be closed unless there is a particular way to persist it.
Unfortunately, our site won’t allow for a single-page app approach, based on the libraries we’re using. Has anyone done anything like this already? Most examples I’ve seen involve using single-page apps and we want to avoid that method.