
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@authon/vue
Advanced tools
Vue 3 SDK for Authon — plugin, composables, and components.
npm install @authon/vue
# or
pnpm add @authon/vue
Requires vue >= 3.3.0.
// main.ts
import { createApp } from 'vue';
import { AuthonPlugin } from '@authon/vue';
import App from './App.vue';
const app = createApp(App);
app.use(AuthonPlugin, {
publishableKey: 'pk_live_...',
});
app.mount('#app');
<script setup lang="ts">
import { useAuthon, useUser } from '@authon/vue';
const { isSignedIn, openSignIn, signOut } = useAuthon();
const { user, isLoading } = useUser();
</script>
<template>
<div v-if="isLoading">Loading...</div>
<div v-else-if="isSignedIn">
<p>Welcome, {{ user?.displayName }}</p>
<button @click="signOut()">Sign Out</button>
</div>
<div v-else>
<button @click="openSignIn()">Sign In</button>
</div>
</template>
<template>
<SignedIn>
<UserButton />
</SignedIn>
<SignedOut>
<button @click="openSignIn()">Sign In</button>
</SignedOut>
</template>
<script setup lang="ts">
import { SignedIn, SignedOut, UserButton, useAuthon } from '@authon/vue';
const { openSignIn } = useAuthon();
</script>
app.use(AuthonPlugin, {
publishableKey: string;
apiUrl?: string;
theme?: 'light' | 'dark' | 'auto';
locale?: string;
appearance?: Partial<BrandingConfig>;
});
useAuthon()const {
isSignedIn, // Ref<boolean>
isLoading, // Ref<boolean>
user, // Ref<AuthonUser | null>
signOut, // () => Promise<void>
openSignIn, // () => Promise<void>
openSignUp, // () => Promise<void>
getToken, // () => string | null
client, // Authon instance
} = useAuthon();
useUser()const { user, isLoading } = useUser();
| Component | Description |
|---|---|
<SignedIn> | Renders slot only when signed in |
<SignedOut> | Renders slot only when signed out |
<UserButton> | Avatar dropdown with sign-out |
<Protect> | Conditional rendering with fallback slot |
FAQs
Authon Vue 3 SDK — plugin, composables, and components
The npm package @authon/vue receives a total of 33 weekly downloads. As such, @authon/vue popularity was classified as not popular.
We found that @authon/vue demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.