https://github.com/cba85/vue3-token-authentication
🔐 Vue 3 Token Authentication example.
https://github.com/cba85/vue3-token-authentication
options-api vite vue-pinia vue-router vue3 vuelidate
Last synced: 5 months ago
JSON representation
🔐 Vue 3 Token Authentication example.
- Host: GitHub
- URL: https://github.com/cba85/vue3-token-authentication
- Owner: cba85
- Created: 2023-04-14T12:21:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-14T12:23:39.000Z (almost 3 years ago)
- Last Synced: 2025-03-11T21:43:50.914Z (about 1 year ago)
- Topics: options-api, vite, vue-pinia, vue-router, vue3, vuelidate
- Language: Vue
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vue 3 Token Authentication
> For demonstration purpose only

Vue 3 Token Authentication example.
Uses:
* No CSS / pure HTML (except for errors 😬)
* [Vue 3](https://vuejs.org/) using [Options API](https://vuejs.org/guide/introduction.html#api-styles) (no Composition API)
* [Vue Router 4](https://router.vuejs.org/)
* [Vuelidate](https://vuelidate-next.netlify.app/) for client-side form validation
* Storage using [Pina](https://pinia.vuejs.org/) and [localStorage](https://developer.mozilla.org/fr/docs/Web/API/Window/localStorage)
* No [setup()](https://vuejs.org/api/composition-api-setup.html) usage (except for Vuelidate 😬)
* Fake token authentication using [Express Fake Token Auth](https://github.com/cba85/express-fake-token-auth-api) on `http://127.0.0.1:3000` url
4 pages (views) using Vue Router:
* `/` : home (public)
* `/login`: login form (guest only)
* `/register`: register form (guest only)
* `/account`: private page (auth only)
Actions:
* (manually) logout button
## Project Setup
```sh
npm install
```
### Compile and Hot-Reload for Development
```sh
npm run dev
```
### Compile and Minify for Production
```sh
npm run build
```