@mspiderv/vuejwtauth
v1.2.2
Published
JWT auth library for Vue.js applications
Downloads
4
Readme
JSON Web Tokens auth for Vue.js and Quasar
This is a client-side JSON Web Tokens (JWT) authentication package for Vue.js and Quasar applications.
This is not a server-side solution. If you need a server-side JWT auth, then take a look at our Laravel server-side package. - comming soon
Features
- Login functionality.
- Remember me functionality. Stores JWT in token storage, using one of the following drivers:
cookie
driver (recommended).localStorage
driver.- You can create your own token storage driver.
- Logout functionality.
- Automatically logout idle users (after 5 minutes by default, but you can configure it or fully disable).
- Fetch user functionality (retrieve any extra information about logged user from API).
- Automatically refreshes JWT to make it valid for ever (based on JWT
exp
property). - Decodes JWT to JSON.
- Allows you to read information from JWT directly.
- Uses jwt-decode under the hood.
- You can create your own token decoder driver.
- Sends HTTP requests to your JWT auth API, using one of the following drivers:
- Axios HTTP driver.
- You can create your own HTTP driver.
- Uses Vuex under the hood, which allows you to use all Vuex module functionality directly.
- Fully configurable.
Contents
Requirements
- This package assumes, you use VueRouter in your application.
- JWT auth server. (Do you need a server-side JWT auth solution? Take a look at our Laravel server-side package - comming soon)
Thanks to
These are the main packages we use under the hood.