Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maciejpedzich/venm-auth-demo
VENM stack JWT authentication demo
https://github.com/maciejpedzich/venm-auth-demo
authentication authorization expressjs jwt jwt-refresh-token mongodb node nodejs vue3-composition-api vue3-demo vue3-typescript vuejs
Last synced: about 1 month ago
JSON representation
VENM stack JWT authentication demo
- Host: GitHub
- URL: https://github.com/maciejpedzich/venm-auth-demo
- Owner: maciejpedzich
- License: mit
- Created: 2021-02-13T21:33:24.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-06-12T10:26:03.000Z (over 3 years ago)
- Last Synced: 2024-04-18T06:59:44.808Z (8 months ago)
- Topics: authentication, authorization, expressjs, jwt, jwt-refresh-token, mongodb, node, nodejs, vue3-composition-api, vue3-demo, vue3-typescript, vuejs
- Language: TypeScript
- Homepage:
- Size: 896 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# venm-auth-demo
> ⚠️ **WARNING:** This code _is not_ 100% production ready. I mean... it's just a demo.
## About this project
This is a VENM stack (basically MERN, but with Vue.js instead of React) JWT auth demo, including a silent/background refresh feature. It utilises Vue 3's Composition API alongside TypeScript and Vuex on the frontend, and as you've probably guessed by now, Node.js with Express and MongoDB (and also TypeScript) on the backend.
## Project setup
```
npm install
```### Environment variables:
Create `.env` file in project's root directory. Add the following variables:
```sh
BACKEND_PORT= # Port of Express auth server
DB_URL= # MongoDB Connection URL
ORIGIN_URL= # URL of CORS origin; i.e. Vue app's URL
JWT_SECRET= # Secret used for signing JWTs
VUE_APP_API_URL= # Express auth server's URL
```### Compiles and hot-reloads for development
```
npm run serve
```For backend:
```
npm run serve:backend
```### Compiles and minifies for production
```
npm run build
```### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).