
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
nuxt-clerk-utils
Advanced tools
Clerk module that builds on top of vue-clerk
This module only works with SSR (server-side rendering) enabled as it uses server API routes. You cannot use this module with nuxt generate
.
nuxt-clerk-utils
# Using pnpm
pnpm add -D nuxt-clerk-utils
# Using yarn
yarn add --dev nuxt-clerk-utils
# Using npm
npm install --save-dev nuxt-clerk-utils
nuxt-clerk-utils
to nuxt.config.ts
export default defineNuxtConfig({
modules: ["nuxt-clerk-utils"],
});
The following environment variables are required in order for this module to function correctly to be defined in your .env
:
NUXT_PUBLIC_CLERK_PUBLISHABLE_KEY=".."
NUXT_CLERK_SECRET_KEY="..."
# Optional: Enable this if you want to handle clerk webhooks
NUXT_CLERK_WEBHOOK_SIGNING_SECRET=".."
NOTE: All of the composables and components are re-exported from vue-clerk. See project documentation for usage
The following helpers are auto-imported in your server/
directory.
// Get the current clerk session if it exists, null otherwise
const clerkSession = await getClerkSession(event);
// Require a clerk session (send back 401 if no `user` session exists)
const clerkSession = await requireClerkSession(event);
To work with webhooks, first create the webhook on the clerk dashboard, and define a handler for it in your app like so:
Note: You must provide the
CLERK_WEBHOOK_SIGNING_SECRET
env (see above)
When defining a webhook in this way, you can assume that the webhook is valid as its signature is automatically verified.
// server/routes/clerk.post.ts
export default defineClerkWebhook('user.created', ({ payload }) => {
console.log('payload', payload)
})
# Install dependencies
pnpm install
# Generate type stubs
pnpm run dev:prepare
# Develop with the playground
pnpm run dev
# Build the playground
pnpm run dev:build
# Run ESLint
pnpm run lint
# Run Vitest
npm run test
npm run test:watch
# Release new version
npm run release
v1.5.13
FAQs
Auth utils for clerk
The npm package nuxt-clerk-utils receives a total of 14 weekly downloads. As such, nuxt-clerk-utils popularity was classified as not popular.
We found that nuxt-clerk-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.