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.
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
feat(rsc-auth): Implement getRoles function in auth mw & update default ServerAuthState #10656
feat(rsc-auth): Implement getRoles function in auth mw & update default ServerAuthState #10656
Changes from 15 commits
a9a9772
34cec37
940fa63
b88b169
910e9ad
9dc27b1
11b3712
3e22b82
12e4eea
71fd715
5f47249
dc7dd9c
a1a2caa
a730f93
f0390de
21df537
8728346
85700ef
854fbe0
01544bc
33c6190
61f6dc1
9618e8e
783a76e
dc7ae9c
d2a2772
5c06594
0672064
ca79741
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check failure on line 8 in packages/auth-providers/supabase/middleware/src/__tests__/createSupabaseAuthMiddleware.test.ts
GitHub Actions / 🏗 Build, lint, test / ubuntu-latest / node 20 latest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am trying to think of a case where the decoded data from the authDecoder is needed to get roles -- and not just the currentUser.
I guess one doesn't have to set roles inside
getCurrentUser
but typically for the auth providers we do.Though this does give some flexibility to define roles outside the currentUser .... which might make ABAC permission easier in the future. Ie - check a permission file/config or lookup db --- for if the username starts with admin , then then get the admin role.
Think will have to use it a bit and get the feel for it, but makes sense and can see ow it will work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for example, if you add roles in supabase user_metadata, it doesn't come through as currentUser.roles!