We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
According to the docs there exists a
// requires the request client to be unauthenticated, aka. guest $apis.requireGuestOnly()
but using this throws TypeError: Object has no member 'requireGuestOnly'
TypeError: Object has no member 'requireGuestOnly'
and I can't find it here either
The text was updated successfully, but these errors were encountered:
Hm, it seems that I've forgotten to add the binding. I'll update it with the next release.
If you want to emulate the same behavior as the middleware, you can try checking for the authRecord and admin context keys:
authRecord
admin
if (c.get("admin") || c.get("authRecord")) { throw new BadRequestError("The request can be accessed only by guests.") }
Sorry, something went wrong.
[#3896] added $apis.requireGuestOnly() middleware JSVM binding
6e6c873
I've added the binding in the develop branch. It will be available with the next v0.20.0 release.
develop
No branches or pull requests
According to the docs there exists a
but using this throws
TypeError: Object has no member 'requireGuestOnly'
and I can't find it here either
The text was updated successfully, but these errors were encountered: