vue-recaptcha-v3 icon indicating copy to clipboard operation
vue-recaptcha-v3 copied to clipboard

useReCaptcha composable returns undefined

Open vandelpavel opened this issue 3 years ago • 0 comments

Hi, i'm developing a website with Quasar framework v2 (based on vue 3). I've created a dedicated bootfile in order to add the plugin to the project.

import { boot } from 'quasar/wrappers';
import { VueReCaptcha } from 'vue-recaptcha-v3';

export default boot(({ app }) => {
  app.use(VueReCaptcha, {
    siteKey: 'my-key-***********',
  });
});

Then inside my composable i added a button and called the composable inside the setup. When clicking the button the console will log the result of the composable which is undefined.

Also wen the page loads this warning will appear:

[Vue warn]: injection "Symbol(VueReCaptchaInjectKey)" not found. 
  at <RegistrationPage onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView> 
  at <QPageContainer> 
  at <QLayout view="lHh Lpr lFf" > 
  at <MainLayout onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView> 
  at <App>

Any ideas on what could be the problem here? Thanks! :)

vandelpavel avatar Nov 09 '21 11:11 vandelpavel