-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Massive errorcount when having another application using postMessage #17
Comments
Thanks for the report and solid idea! |
TODO
Thoughts? |
You mean that the message then looks like this |
Yes, but slightly different: {
"type": "token.pow.mcaptcha.org",
"body": {
"token": "xxx"
}
} |
I see; this would work too. |
I also encountered a lot of errors when applying mCaptcha in vue. In the Vite dev server. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The core library relies on the
message
event to (it seems) exchange the token from the worker to the application.But when having another application/library running (i.e. Angular dev tools) that uses the
postMessage
/message
ecessivly, this leads to many errors in the log.The related code seems to be this:
glue/packages/core/src/index.ts
Lines 98 to 107 in b06f3e7
Maybe the library should send some sort of identification in the message? I.e:
{ type: 'mcaptcha', token: xxx }
, so the code can check for the type and ignore any other messages?The text was updated successfully, but these errors were encountered: