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 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-cli-plugin-auth0

v1.0.4

Published

Vue CLI 4 plugin for adding Auth0 files.

Downloads

42

Readme

Vue Auth0 plugin

Vue CLI 4 Plugin for adding the files required for setting up Auth0 authentication.

Build Status

Index

Pre-install

  1. Sign-up and login to you Auth0 Dashboard: https://auth0.com/

  2. Create an Auth0 Client/Application: Dashboard > Applications > Create Application

    1. Enter the name of your application.
    2. Select Single Page Web Applications
    3. Press Create
    4. Select Settings
    5. Add http://localhost:8080 to the following fields:
      • Allowed Callback URLs
      • Allowed Web Origins
      • Allowed Logout URLs
    6. Scroll down to the bottom and press Save Changes
  3. (Optional) Setup desired connections: Dashboard > Connections > Social

    1. Connections are third party services that can be used to authenticate with, for example:
      • Google
      • GitHub
      • Facebook
    2. (WARNING) The default Google connection will let you login but won’t keep you logged in if you leave or refresh the website. this is a Auth0’s default connection and its just for testing purposes.

Installation

  • Run vue add auth0 from your project's root folder.
  • Files Generated:
    1. auth_config.json: Stores Auth0's domain and clientId.
    2. src/auth/index.js: Main Auth0 lib file containing authentication logic.
    3. src/auth/authGuard.js: Can be used to protect private vue-router routes.
    4. src/views/Profile.vue: A very simple profile component to be used with vue-router.
  • Files Updated:
    1. src/App.vue
    2. src/main.js
    3. src/router/index.js

Options

  1. Have you configured an Auth0 client? If not, make sure to update auth_config.json afterwards

    1. Auth0 client domain? You can get this from the Application Settings page.
    2. Auth0 client ID? You can get this from the Application Settings page.
  2. Would you like to use Vue Router? This is the recomended setup for most Apps.

    1. Use history mode for router? (Requires proper server setup for index fallback in production)

Usage

Contributing

Development

# Run a vue inside the dev container
docker run --rm -it \
  -v "$(pwd)":/auth0 \
  -p 8080:8080 \
kaizendorks/vue:4 sh

# Create sample app
vue create app

# Change dir to project dir
cd app

# Install plugin
npm install --save-dev file:/auth0

# Run plugin
vue invoke vue-cli-plugin-auth0

# Install new deps, if you get any errors try rm -rf package-lock.json
npm install

# Run app
npm run serve

CI

# Build image
docker build -t auth0 .

# Dgoss Tests (quick smoke test to check if files were generated)
docker run --rm -it \
  -v "$(pwd)/tests":/src \
  -v /var/run/docker.sock:/var/run/docker.sock \
iorubs/dgoss run auth0

# Edit tests
docker run --rm -it \
  -v "$(pwd)/tests":/src \
  -v /var/run/docker.sock:/var/run/docker.sock \
iorubs/dgoss edit auth0

Goss is tool for validating server’s configuration (avoid conf. drift). Dgoss is a wrapper written on top of goss for validating docker images. https://github.com/aelsabbahy/goss/tree/master/extras/dgoss