Skip to content

Passing parent, args and context into a custom perm auth scope #104

Answered by hayes
mmahalwy asked this question in Q&A
Discussion options

You must be logged in to vote

Auth is a complicated topic, lots of opinions, strategies and tradeoffs that can be made.

  1. All three of these are things that can be used and combined in different ways, so there isn't a concrete answer here.
    1. scope loaders (eg customPerm): This pattern is useful for integrating with other auth libraries or permissions systems. It allows you to have a place on fields and types where you can define a parameters that will be passed to another library. This is what I would recommend for something like CASL (I'll add more detail below), but it is very flexable and can be used in a number of different ways.
    2. authScopes as a function on a field: This is useful if the scopes needed to resolve a f…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by hayes
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #103 on July 20, 2021 17:47.