jv3-login-jwt
TypeScript icon, indicating that this package has built-in type declarations

1.2.0-5 • Public • Published

jv3-jwt

install

npm install jv3-login-jwt

init to Vue3 app

/* main.js */
import { createApp } from "vue";
import App from "./App.vue";
import router from "./router/example-router";

// install plugins
import auth from "jv3-jwt";

const app = createApp(App);
app.use(auth, {
    router,
    url: "http://localhost:8080",
    // apiUrl: "/auth",
    path_login: "auth/basic/verify",
    path_refresh: "auth/basic/refresh",
    path_user: "user/me",
    login: () => {},
    logout: () => {},
    exceptions: [],
    jwtStorage: "jwt",
    authStorage: "jauth",
    defaultRoutePath: "/",
    customLogin: () => {},
    callbackLogin: () => {},
    customLogout: () => {},
    callbackLogout: () => {},
    handleError: (error) => {
        console.log(error);
    },
    title: "Sigin",
    hello: "Hello นี้คือระบบล็อกอิน แบบง่าย"
});

app.use(router);
app.mount("#app");

Readme

Keywords

Package Sidebar

Install

npm i jv3-login-jwt

Weekly Downloads

0

Version

1.2.0-5

License

MIT

Unpacked Size

3.38 MB

Total Files

10

Last publish

Collaborators

  • cdnagroup