Skip to content

vercel-support/nuxt-botid

Repository files navigation

Bot ID Nuxt Validation App

This is a small Nuxt test application for validating Vercel Bot ID on login and signup flows.

What it protects

  • POST /api/auth/login
  • POST /api/auth/signup

The browser app initializes Bot ID for both routes. The server handlers call checkBotId() and return:

  • 200 with verdict: "human" when the request passes Bot ID.
  • 403 with verdict: "bot" when Bot ID classifies the request as automation.

Both client and server Bot ID checks explicitly use advancedOptions.checkLevel: "basic" so the protected route configuration matches on each side.

Run locally

pnpm install
pnpm dev

Open the local URL and use Test human request. The UI also renders a curl command for the selected endpoint.

Local development verifies that the Bot ID client and server calls are wired correctly. On localhost, the rendered curl command includes ?simulate=bot, which uses Bot ID's documented developmentOptions.bypass: 'BAD-BOT' behavior to exercise the blocked response locally.

Curl bot test

After deploying to Vercel, copy the curl command from the UI. The deployed UI does not include the local simulation query parameter. A direct curl request should return an HTTP 403 response containing a JSON body with verdict: "bot" based on real Bot ID classification.

Vercel

The Nuxt config includes:

modules: ['botid/nuxt']

Deploy the app to Vercel, enable/configure Bot ID for the project if required by your account, then validate both flows from the hosted URL.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors