
Product
PHP and Composer Support Is Now in Beta
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.
@authon/nuxt
Advanced tools
English | 한국어
Nuxt 3 authentication module with auto-imported composables and Vue components
Requires Node.js ^20.19.0 or >=22.12.0, matching the supported runtime of
the current Nuxt release.
npm install @authon/nuxt
NUXT_PUBLIC_AUTHON_PUBLISHABLE_KEY=pk_test_...
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@authon/nuxt'],
runtimeConfig: {
public: {
authon: {
publishableKey: process.env.NUXT_PUBLIC_AUTHON_PUBLISHABLE_KEY,
},
},
},
})
The module installs the runtime plugin and auto-imports useAuthon and
useUser. Components are available from @authon/nuxt:
<script setup lang="ts">
import { AuthonSignedIn, AuthonSignedOut, AuthonUserButton } from '@authon/nuxt'
const authon = useAuthon()
const { user } = useUser()
</script>
<template>
<AuthonSignedOut><button @click="authon.client?.openSignIn()">Sign in</button></AuthonSignedOut>
<AuthonSignedIn>
<p>Welcome, {{ user?.displayName }}</p>
<AuthonUserButton />
</AuthonSignedIn>
</template>
For explicit imports, use the dedicated entry point:
import { useAuthon, useUser } from '@authon/nuxt/composables'
The module also accepts inline options. Keep the publishable key in public runtime config; a server secret, if your own endpoints need one, belongs in private runtime config and is not required by the browser module.
export default defineNuxtConfig({
modules: ['@authon/nuxt'],
authon: {
publishableKey: process.env.NUXT_PUBLIC_AUTHON_PUBLISHABLE_KEY,
config: { theme: 'auto' },
globalMiddleware: false,
},
})
globalMiddleware installs Authon's route middleware globally. Client-side
route guards improve navigation UX, but sensitive server/API operations must
still verify an access token.
createAuthonPlugin remains exported for compatibility, but is deprecated for
Nuxt applications. Do not create plugins/authon.client.ts in new projects;
use modules: ['@authon/nuxt'], auto-imports, and
@authon/nuxt/composables instead.
authonModule, AuthonModuleOptionsuseAuthon, useUser, useAuthonWeb3,
useAuthonPasswordless, useAuthonPasskeysAuthonSignIn, AuthonSignUp, AuthonUserButton,
AuthonSignedIn, AuthonSignedOutcreateAuthonPlugin (deprecated),
createAuthMiddleware, renderSocialButtonsMIT
FAQs
Authon Nuxt 3 module — auto-imported composables and middleware
The npm package @authon/nuxt receives a total of 460 weekly downloads. As such, @authon/nuxt popularity was classified as not popular.
We found that @authon/nuxt 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.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.

Research
/Security News
Three compromised Rust crates pulled in a malicious dependency that downloaded and executed cross-platform malware during Cargo builds.