Newer
Older
This [Vue3](https://vuejs.org/) application demonstrates the common principles about how
a frontend application can log in, query and log out a backend, based on a web session.
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).




[](https://gitlab.uliege.be/philippe.bajoit/vue-auth-backend/-/commits/main)
[](https://gitlab.uliege.be/philippe.bajoit/vue-auth-backend/-/commits/main)
## Customize configuration
See [Vite Configuration Reference](https://vite.dev/config/).
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.
## 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
```
## 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