feat(auth0-fastify): use AsyncLocalStorage to track FastifyRequest and FastifyReply#39
Open
frederikprijck wants to merge 1 commit intomainfrom
Open
feat(auth0-fastify): use AsyncLocalStorage to track FastifyRequest and FastifyReply#39frederikprijck wants to merge 1 commit intomainfrom
frederikprijck wants to merge 1 commit intomainfrom
Conversation
b243b92 to
de26997
Compare
c84c9fc to
e6762f7
Compare
14b6a71 to
a059bf8
Compare
95bfbe7 to
52bc34c
Compare
4f2ced8 to
a54daaa
Compare
a54daaa to
41e0232
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR moves
requestandreplyinstances to Async Local Storage by using theonRequesthook. Because of this, we have global access to the request and reply instances, and we have no need to pass the request and reply instances to every single public method.Before:
After:
We remain to accept both approaches, but we have marked the one where you pass
requestandreplyas deprecated.References
N/A
Testing
Checklist