Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Vue CLI plugin for Authentication

License

Notifications You must be signed in to change notification settings

sunkarapk/vue-cli-plugin-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-cli-plugin-auth

Vue CLI plugin for Authentication

Installation

$ vue add auth

Usage

Script

This will create a src/auth.js file which you can use in your Vue component script as following:

import auth from './auth';

export default {
  data() {
    return {
      auth
    }
  }
}

and then you can use auth.authenticated to check whether the user is authorized or not.

Template

You can also use auth.login() and auth.logout() to do the described actions.

<a @click="auth.login()" href="#" v-show="!auth.authenticated">Login</a>
<a @click="auth.logout()" href="#" v-show="auth.authenticated">Logout</a>

Contributors

Here is a list of Contributors

TODO

I accept pull requests and guarantee a reply back within a day

License

MIT/X11

Bug Reports

Report here. Guaranteed reply within a day.

Contact

Pavan Kumar Sunkara (pavan.sss1991@gmail.com)

Follow me on github, twitter

About

Vue CLI plugin for Authentication

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •