Add a short description of your App Extension. What does it do? How is it beneficial? Why would someone want to use it?
quasar ext add mamy-auth
Quasar CLI will retrieve it from NPM and install the extension.
When installing the Auth app extension, you will be prompted with fourteen questions:
- Route for authentication
The default is /login, it allows you to define the login route
- Route where the user will be redirected once connected
The default is /, you can define where you want to be redirect once connected
- Route for code verification after performing the forgotten password
The default is /check_code, you can define other route
- Route for password update
The default is /reset_password
- Basic server route
The default is http://localhost:3000, you must point it to your server base url
- Server route for authentication
The default is /users/sign_in
- Server route to reset password
The default is /users/reset_password
- Server route to update password
The default is /users/passwords
- Authorization type
The default is Bearer but you can change it according to your needs
- Vuex mutation to set token
The default is auth/setToken in the auth module. It can be changed from the moment it takes the token in parameter
- Vuex mutation to clear token and all user state
The default is auth/clearToken in the auth module but can be changed
- Vuex mutation to set user information when resetting password (email or phone number)
The default is auth/setInfosUser in auth module. It takes email or phone number, can be changed
- Vuex getter to return token
The default is auth/getToken and return token, can be changed.
- Vuex getter to return user information
The default is auth/getInfosUser and return email or phone number
quasar ext remove mamy-auth
The parent application must provide the following mutations:
A mutation to store the token, it takes the token in parameter
A mutation to clean the token and the user information
A mutation to define the user information during the process of forgotten password (email or phone number), it takes in parameter the email or the phone number.
A getter which returns the token
A getter that returns the email or the phone number defined during the process of forgotten password.
When installing the extension, the path to these mutations and getters must be provided. As well as the different routes of the pages and APIs, without forgetting the type of authorization.
In auth mutation:
export function setToken(state, payload) {
state.token = payload
}
export function clearToken(state) {
state.token = null
}
In auth getter:
export function getToken(state) {
return state.token
}
A Quasar Framework app for Auth Extension
yarn dep
yarn dev
yarn lint
yarn test:e2e
yarn test:e2e:ci
See dev/Configuring quasar.conf.js.
Cypress automatically after being launched.
Launch test E2E mode and select your test file
Launch test E2E with Continuous integration mode and cypress test all file in directory:
/test/cypress/integration/
If you appreciate the work that went into this App Extension, make donation to Sowell
MIT (c) Sowell