This app extension provides token based authentication functionality.
quasar ext add auth-token-basedQuasar CLI will retrieve it from NPM and install the extension.
The installation prompts for the routes which should be used to communicate with the backend. The requests and responses of the server should match with this extension. Please have a look at https://github.com/stefanvanherwijnen/express-ts-api-starter to see which format this extension uses.
It will also prompt for superuser functionality. This means it will have support for a 'superuser' role which grants access to a list of users, as shown in the screenshot.
A menu component is available as AuthMenu. To use it, add it to the layout, e.g.:
<template>
<q-layout view="lHh Lpr lFf">
...header
<q-drawer>
<auth-menu />
</q-drawer>
...container
</q-layout>
</template>
<script>
import AuthMenu from './auth/AuthMenu'
export default {
name: 'MyLayout',
components: {
AuthMenu
}
}
</script>Note that an existing axios boot file will be overwritten.
quasar ext remove auth-token-basedIf you appreciate the work that went into this App Extension, please consider donating to Quasar.
