Lightweight Authentication Library For Vue.js 3

Description:

A simple and lightweight authentication library to simplify the authentication task of your Vue.js 2 or Vue.js 3 application.

Basic usage:

1. Import necessary components into your app.

import {createApp} from 'vue';
import {createRouter} from 'vue-router';
import axios from 'axios';
import App from 'App.vue';
import {createAuth} from '@websanova/vue-auth';
import driverAuthBearer from '@websanova/vue-auth/dist/drivers/auth/bearer.esm.js';
import driverHttpAxios from '@websanova/vue-auth/dist/drivers/http/axios.1.x.esm.js';
import driverRouterVueRouter from '@websanova/vue-auth/dist/drivers/router/vue-router.2.x.esm.js';
import driverOAuth2Google from '@websanova/vue-auth/dist/drivers/oauth2/google.esm.js';
import driverOAuth2Facebook from '@websanova/vue-auth/dist/drivers/oauth2/facebook.esm.js';

2. Basic usage:

var router = createRouter({
    ...
})
var auth = createAuth({
    plugins: {
        http: axios,
        router: router
    },
    drivers: {
        http: driverHttpAxios,
        auth: driverAuthBearer,
        router: driverRouterVueRouter,
        oauth2: {
            google: driverOAuth2Google,
            facebook: driverOAuth2Facebook,
        }
    },
    options: {
        rolesKey: 'type',
        notFoundRedirect: {name: 'user-account'},
    }
});
createApp(App)
    .use(router)
    .use(auth)
    .mount('#app');

Preview:

Lightweight Authentication Library For Vue.js 3

Download Details:

Author: websanova

Live Demo: https://vue-auth.websanova.com/

Download Link: https://github.com/websanova/vue-auth/archive/master.zip

Official Website: https://github.com/websanova/vue-auth

Install & Download:

# NPM
$ npm i @websanova/vue-auth --save

You Might Be Interested In:

Add Comment