https://github.com/optixsolutions/vue-auth
https://github.com/optixsolutions/vue-auth
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/optixsolutions/vue-auth
- Owner: optixsolutions
- License: mit
- Created: 2018-07-09T10:24:48.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-30T13:37:15.000Z (almost 8 years ago)
- Last Synced: 2026-04-08T20:53:45.412Z (4 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Vue Auth
Easy client side authentication for your Vue applications.
## Installation
```bash
npm install @optix/vue-auth --save
```
```javascript
import Vue from 'vue';
import VueAuth from '@optix/vue-auth';
Vue.use(VueAuth);
```
## Usage
Accessing the auth object:
```javascript
// Globally
Vue.auth.token();
// On an instance
this.$auth.token();
```
### Methods
* setToken(token)
* token()
* hasToken()
* removeToken()
* setUser(user)
* user()
* removeUser()
* check()
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.