I have a nuxt3 app, and i want to add recaptcha to the registration form.
Im using vue-recaptcha-v3
package, like this in plugins/google-recaptcha.ts
:
import { VueReCaptcha } from 'vue-recaptcha-v3';
export default defineNuxtPlugin((nuxtApp) => {
const config = useRuntimeConfig();
nuxtApp.vueApp.use(VueReCaptcha, {
siteKey: config.public.recaptchaKey,
loaderOptions: {
autoHideBadge: false,
explicitRenderParameters: {
badge: 'bottomleft'
}
}
});
});
The problem is that i want the plugin to load only on the registration page, nowhere else. Any way to do this?