Skip to content
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

prehandler not working #27

Open
a4545 opened this issue Jul 19, 2021 · 0 comments
Open

prehandler not working #27

a4545 opened this issue Jul 19, 2021 · 0 comments

Comments

@a4545
Copy link

a4545 commented Jul 19, 2021

can we add prehandler in our routes while implementing Auth if yes pls give a sample piece of code how it should be implemented,also server.decorate didnt worked thats why got this error
Actually itried doing this but failed got error
export default fp(async (server, opts, next) => {
const verifyAuthUserService = verifyAuthUser(server, opts, next);
server.decorate('verifyAuthService',{...verifyAuthUserService});
next();
});
after this i was trying to access it in prehandler it didnt worked.
error.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant