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

docs: Update anonymous hook to support around hooks #3379

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

howlettt
Copy link
Contributor

@howlettt howlettt commented Jan 4, 2024

The current anonymous hook in the documentation doesn't work with around hooks since it doesn't have the next param
https://feathersjs.com/cookbook/authentication/anonymous.html

return async (context: HookContext) => {

This PR adds a optional next param so it can be used in both before & around hooks, making it consistent with the authenticate hook
https://feathersjs.com/api/authentication/hook

It can be used as a before or around hook.

@daffl daffl changed the title Docs: Update anonymous hook to support around hooks docs: Update anonymous hook to support around hooks Jan 5, 2024
@daffl daffl merged commit 094056a into feathersjs:dove Jan 5, 2024
2 checks passed
@daffl
Copy link
Member

daffl commented Jan 5, 2024

Thank you!

@howlettt howlettt deleted the allow-anonymous-around branch January 6, 2024 01:02
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

Successfully merging this pull request may close these issues.

2 participants