An authentication demo with Express.js and Vue.js. The following technologies were used in the project, you can find them in the code.
- Session based authentication.
- HTML5 history mode.
- CORS with cookie.
- HTTPS with self-signed certificate.
export N_NODE_MIRROR="https://mirrors.ustc.edu.cn/node/"
export N_NODE_DOWNLOAD_MIRROR="https://mirrors.ustc.edu.cn/node/"
curl -fsSL https://raw.githubusercontent.com/tj/n/master/bin/n | sudo -E bash -s lts
- podman (and start as a service).
- podman-compose.
git clone https://github.com/Arondight/express-auth-demo.git
cd ./express-auth-demo/
sudo podman-compose -f ./podman-compose/mongodb.yml up -d
npm install
npm run build
npm start
Run the command below and trust the certificate in browser.
xdg-open https://localhost:3000/hello
xdg-open https://localhost:8000/hello
In Firefox click the Advanced...
then the Accept the Risk and Continue
. In Chrome click Adavanced
then click Proceed to localhost (unsafe)
.
xdg-open https://localhost:8000