npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue-oms-auth

v1.0.1

Published

vue-oms-auth

Readme

fork from vue-sellsuki-auth-2

Sellsuki Auth v2

Vue plugin for sellsuki authentication to connect between sellsuki microservices and sellsuki login portal.

Features

  • Option to extend prepare login page (Component & Route)
  • Setup data from cookie to local storage
  • Auth Middleware to check your auth status on every route change (check cookie exist)
  • Provide function to access to the cookie data

Update

  • Prepare Login Page and route for Sellsuki Authenticate (2.0)
  • Add new option to check only store or bother user and store token (2.1)
  • Remove store option and add public option that accept array of public route name to by pass auth middleware (2.2)
  • Optional store id params for prepare login instead of accept "0" for no store (2.3.1)
  • Option to config auth middleware (auto inject beforeEach hook and check auth data) default = true (2.5.0)
  • Function to check auth data manually (checkAuth), check cookie, localstorage, instance then redirect (2.5.1)
  • Component error on vue 2.5.* so fixed it to support both < 2.5 > versions (2.5.2)
  • Fix authMiddleware and Extend option's flag check (2.5.5)
  • add optional path parameter for initLocalStorage (2.5.6)

Requirement

  • vue 2.x +
  • vue-router 2.2 +

Initiate

Initiate plugin by Vue.use and add some options then the plugin will takecare everything for you. If cookie exist your app will work as it be but if cookie gone the plugin will redirect to the login portal.

...

Note that we catch all unavailable route and redirect to prepare login, So if you have redirect route like

{ path: '*', redirect: { path: '/' } }

You need to remove it from your route to protect the duplicate error.

import Vue from 'vue'
import VueRouter from 'vue-router'
import VueSellsukiAuth from 'vue-sellsuki-auth'

...

var router = new VueRouter({
  routes: [
    { path: '/hello', component: Hello }
  ]
})

// Set plugin option, If you have public route to by pass authentication add the name to public option as array
let options = {
  portal: 'loginPortalUrl',
  router: router,
  public: ['news', 'register']
}

// Normally the plugin will inject prepare login page and route to your instance.
// So if you have your own preapre login component and don't need any help then set the extend to false.
let options = {
  portal: 'loginPortalUrl',
  router: router,
  extend: false
}

// Normally the plugin will inject beforeEach hook to validate auth data.
// So if you need to use beforeEach hook bby yourself you need to disabled authMiddleware (default = true).
// Then we provide checkAuth method to check data manually.
let options = {
  portal: 'loginPortalUrl',
  router: router,
  authMiddleware: false
}

// Inject plugin to vue instance
Vue.use(VueSellsukiAuth, options)

Available Methods

function [return type]

checkAuth

Check auth data manually, If it's not valid then redirect to portal

this.$sellsuki_auth.checkAuth()

getAuthStatus [bool]

Check status of the authentication (true if all data exist)

let status = this.$sellsuki_auth.getAuthStatus()

getAuthData [object]

Get all data from cookie as JSON

let authData = this.$sellsuki_auth.getAuthData()

// Returned Object
authData: {
  facebook: {},
  facebookToken: '',
  user: {},
  bearer: {},
  sellsukiToken: '',
  storeId: '',
  status: false
}

getFacebookData [object]

Get auth data from cookie especially facebook data

let facebookData = this.$sellsuki_auth.getFacebookData()

// Returned Object
facebookData: {
  facebook: {},
  facebookToken: ''
}

getSellsukiData [object]

Get auth data from cookie especially sellsuki data

let sellsukiData = this.$sellsuki_auth.getSellsukiData()

// Returned Object
sellsukiData: {
  storeId: '',
  user: {},
  sellsukiToken: '',
  bearer: {}
}