Auth0 Vue

v1.0.0

Use when adding authentication to Vue.js 3 applications (login, logout, user sessions, protected routes) - integrates @auth0/auth0-vue SDK for SPAs with Vite...

0· 71·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for auth0/auth0-vue.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Auth0 Vue" (auth0/auth0-vue) from ClawHub.
Skill page: https://clawhub.ai/auth0/auth0-vue
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install auth0-vue

ClawHub CLI

Package manager switcher

npx clawhub@latest install auth0-vue
Security Scan
Capability signals
Requires OAuth tokenRequires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the instructions: the SKILL.md and reference docs exclusively describe integrating @auth0/auth0-vue into Vue 3 apps, protecting routes, and calling APIs. The guidance to create VITE_AUTH0_DOMAIN and VITE_AUTH0_CLIENT_ID (client ID + domain) is consistent with the purpose; no unrelated services, binaries, or credentials are requested.
Instruction Scope
Runtime instructions stay within scope: they tell the developer to install the SDK, configure the plugin, create .env entries, and optionally use the Auth0 CLI to create/manage an application. The setup docs explicitly warn not to read .env contents and require user confirmation before writing to .env, which limits dangerous scope creep.
Install Mechanism
The skill is instruction-only (no install spec), which is low risk. The automated setup scripts, however, recommend installing the Auth0 CLI via typical package managers (brew, scoop) and include a curl -sSfL https://raw.githubusercontent.com/... | sh pattern for Linux — a common convenience but higher-risk pattern because it downloads and executes a script. The URL is GitHub raw (official project) rather than a personal server, which mitigates but does not eliminate risk. Review the install script before executing.
Credentials
The skill does not request platform-level secrets or list required env vars in its metadata. It instructs creating VITE_ variables in a project .env (public client ID and domain). The automated setup prompts the user to run auth0 login (which will create local CLI session tokens) and writes public client info into .env only after explicit confirmation — behavior proportionate to the described purpose. Be aware that auth0 CLI login will store credentials/tokens locally as part of normal CLI behavior.
Persistence & Privilege
The skill does not request persistent agent-level privileges (always: false) and contains no code that modifies other skills or global agent config. The only persistent changes described are appending to the project's .env and optional installation of the Auth0 CLI via system package managers — both are expected for a developer-facing setup flow and are performed only with user action/consent.
Assessment
This skill is coherent with adding Auth0 to Vue 3 apps, but review and run setup steps manually rather than blindly. Specific points to consider before installing/running scripts: - The automated setup may install the Auth0 CLI (brew/scoop or a curl | sh installer). Inspect the install script (https://raw.githubusercontent.com/auth0/auth0-cli/main/install.sh) before executing. Prefer package-manager installs you trust. - The setup scripts call auth0 login and may create/modify an Auth0 application; that will open a browser and store CLI session tokens locally — this is expected but be aware it grants the CLI access to your Auth0 tenant. - The scripts append client configuration to your project .env. Confirm the prompt before writing to an existing .env to avoid inadvertently exposing unrelated secrets. - The client ID and domain are public (not secrets), but you should never place client secrets in client-side .env files. If you prefer a lower-risk path: skip the automated scripts and manually create an Auth0 SPA application in the Auth0 Dashboard and add VITE_AUTH0_DOMAIN and VITE_AUTH0_CLIENT_ID to your project .env as shown in the docs.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🔐 Clawdis
latestvk972qkn15awczb0g5qpk63ajnx84zt8v
71downloads
0stars
1versions
Updated 1w ago
v1.0.0
MIT-0

Auth0 Vue.js Integration

Add authentication to Vue.js 3 single-page applications using @auth0/auth0-vue.


Prerequisites

  • Vue 3+ application (Vite or Vue CLI)
  • Auth0 account and application configured
  • If you don't have Auth0 set up yet, use the auth0-quickstart skill first

When NOT to Use

  • Server-side rendered Vue apps - See Auth0 Nuxt.js guide for SSR patterns
  • Vue 2 applications - This SDK requires Vue 3+, use legacy @auth0/auth0-spa-js wrapper
  • Embedded login - This SDK uses Auth0 Universal Login (redirect-based)
  • Backend API authentication - Use express-openid-connect or JWT validation instead

Quick Start Workflow

1. Install SDK

npm install @auth0/auth0-vue

2. Configure Environment

For automated setup with Auth0 CLI, see Setup Guide for complete scripts.

For manual setup:

Create .env file:

VITE_AUTH0_DOMAIN=your-tenant.auth0.com
VITE_AUTH0_CLIENT_ID=your-client-id

3. Configure Auth0 Plugin

Update src/main.ts:

import { createApp } from 'vue';
import { createAuth0 } from '@auth0/auth0-vue';
import App from './App.vue';

const app = createApp(App);

app.use(
  createAuth0({
    domain: import.meta.env.VITE_AUTH0_DOMAIN,
    clientId: import.meta.env.VITE_AUTH0_CLIENT_ID,
    authorizationParams: {
      redirect_uri: window.location.origin
    }
  })
);

app.mount('#app');

4. Add Authentication UI

Create a login component:

<script setup lang="ts">
import { useAuth0 } from '@auth0/auth0-vue';

const { loginWithRedirect, logout, isAuthenticated, user, isLoading } = useAuth0();
</script>

<template>
  <div>
    <div v-if="isLoading">Loading...</div>

    <div v-else-if="isAuthenticated">
      <img :src="user?.picture" :alt="user?.name" />
      <span>Welcome, {{ user?.name }}</span>
      <button @click="logout({ logoutParams: { returnTo: window.location.origin }})">
        Logout
      </button>
    </div>

    <button v-else @click="loginWithRedirect()">
      Login
    </button>
  </div>
</template>

5. Test Authentication

Start your dev server and test the login flow:

npm run dev

Detailed Documentation

  • Setup Guide - Automated setup scripts (Bash/PowerShell), CLI commands, manual configuration
  • Integration Guide - Protected routes, API calls, error handling, composables
  • API Reference - Complete SDK API, configuration options, composables reference, testing strategies

Common Mistakes

MistakeFix
Forgot to add redirect URI in Auth0 DashboardAdd your application URL (e.g., http://localhost:3000, https://app.example.com) to Allowed Callback URLs in Auth0 Dashboard
Using wrong env var prefixVite requires VITE_ prefix, Vue CLI uses VUE_APP_
Not handling loading stateAlways check isLoading before rendering auth-dependent UI
Storing tokens in localStorageNever manually store tokens - SDK handles secure storage automatically
Missing createAuth0 plugin registrationMust call app.use(createAuth0({...})) before mounting app
Accessing auth before plugin loadsWrap auth-dependent code in v-if="!isLoading"

Related Skills

  • auth0-quickstart - Basic Auth0 setup
  • auth0-migration - Migrate from another auth provider
  • auth0-mfa - Add Multi-Factor Authentication

Quick Reference

Core Composables:

  • useAuth0() - Main authentication composable
  • isAuthenticated - Reactive check if user is logged in
  • user - Reactive user profile information
  • loginWithRedirect() - Initiate login
  • logout() - Log out user
  • getAccessTokenSilently() - Get access token for API calls

Common Use Cases:


References

Comments

Loading comments...