Great, thanks! Look forward to pulling it down. Having just gotten through the exercise of writing some custom middlewares to more flexibly leverage some of the older things out there, can’t wait to see it being done the “right” way!
I am Alberto and I’m a product manager with Auth0, working on Quickstarts and SDKs.
Thanks for your interest in our upcoming Express middleware.
We anticipate to release a beta version of this new middleware soon. As soon as it’s ready for testing, I will post more details here so that you can get your hands on it and provide feedback.
Note that this will be a middleware to secure webapps written in Node.js and Express.js.
Should I rely on this future release or auth0-spa-js ?
Currently using Node.js + express-session + Vue on Webpack dev server, and the settings aren’t perfect… (I have to customize to my own needs.)
Not sure if I should use localStorage or server-side database to store Auth0 session.
It depends. Do you need the session on the server or on the client? Does your client-side application need to acquire tokens to call an API?
If your backend just serves the client-side application, and the single page application needs to sign in the user and do API calls, then auth0-spa-js would seem like a good option. This architecture is described here: Single-Page Applications (SPA) with API.
An example would be:
Express backend serves SPA
(optional) Express backend exposes API endpoints. In said endpoints, a valid token is required to authenticate requests
SPA performs sign-in flow and acquires tokens to make requests to API endpoints (in Express backend or elsewhere)
The SPA SDK allows to perform sign-in and acquire tokens from single page applications.
In contrast, this new middleware implements sign-in flow from the server-side. The session then exists in the backend.
If you just need the session on the server-side and you are using Express, the new middleware would help. This example is described here: Regular Web Applications with Single Sign-On