Skip to content
Snippets Groups Projects
README.md 2.31 KiB
Newer Older
PhilippeBajoit's avatar
PhilippeBajoit committed
# vue-auth-backend

PhilippeBajoit's avatar
PhilippeBajoit committed
This [Vue3](https://vuejs.org/) application demonstrates the common principles about how
PhilippeBajoit's avatar
PhilippeBajoit committed
a frontend application can log in, query and log out a backend, based on a web session.
PhilippeBajoit's avatar
PhilippeBajoit committed

PhilippeBajoit's avatar
PhilippeBajoit committed
It includes an MFA integration with the second factors being either an email or a TOTP app
like [Google Authenticator](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2).
PhilippeBajoit's avatar
PhilippeBajoit committed

PhilippeBajoit's avatar
PhilippeBajoit committed
![GitLab Top Language](https://img.shields.io/gitlab/languages/philippe.bajoit%2Fvue-auth-backend?gitlab_url=https%3A%2F%2Fgitlab.uliege.be%2F)
![GitLab Language Count](https://img.shields.io/gitlab/languages/count/philippe.bajoit%2Fvue-auth-backend?gitlab_url=https%3A%2F%2Fgitlab.uliege.be%2F)
![GitLab License](https://img.shields.io/gitlab/license/philippe.bajoit%2Fvue-auth-backend?gitlab_url=https%3A%2F%2Fgitlab.uliege.be%2F)

![GitLab Stars](https://img.shields.io/gitlab/stars/philippe.bajoit%2Fvue-auth-backend?gitlab_url=https%3A%2F%2Fgitlab.uliege.be%2F)
[![pipeline status](https://gitlab.uliege.be/philippe.bajoit/vue-auth-backend/badges/main/pipeline.svg)](https://gitlab.uliege.be/philippe.bajoit/vue-auth-backend/-/commits/main)
[![coverage report](https://gitlab.uliege.be/philippe.bajoit/vue-auth-backend/badges/main/coverage.svg)](https://gitlab.uliege.be/philippe.bajoit/vue-auth-backend/-/commits/main)

PhilippeBajoit's avatar
PhilippeBajoit committed
## Customize configuration

See [Vite Configuration Reference](https://vite.dev/config/).

PhilippeBajoit's avatar
PhilippeBajoit committed
Two main settings are to consider in `include.php` :
* `const DEVELOPMENT = True|False` will determine the log level and the capability 
to accept [localhost](http://localhost:5173) in CORS headers,
* `'send_email' => True|False` will determine if emails are sent with the mail() function, or if the email contents 
are shown to the user through web responses, to work on a web hosting without the capability to send emails.

PhilippeBajoit's avatar
PhilippeBajoit committed
## Project Setup

```sh
npm install
```

### Compile and Hot-Reload for Development

```sh
npm run dev
```

### Compile and Minify for Production

```sh
npm run build
```

### Lint with [ESLint](https://eslint.org/)

```sh
npm run lint
```
PhilippeBajoit's avatar
PhilippeBajoit committed
## Project Deployment

The application requires a web server including PHP 8.2 + with support of PDO and SQlite 3.

The typical deployment is 
* the npm dist content is deployed at the root of the site
* the code directory /api is deployed in a subdirectory of the root called /api