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

Add scopeIncludesAny middleware #84

Merged
merged 4 commits into from
Dec 19, 2022
Merged

Add scopeIncludesAny middleware #84

merged 4 commits into from
Dec 19, 2022

Conversation

ewanharris
Copy link
Contributor

Description

The scopeIncludesAny middleware checks a token's scope claim against the provided values raising a 403 insufficient_scope error if none of the provided values exist in the scope claim, if any of the provided values exist then it will provide access.

Also updates ts-node-dev in packages/examples to fix an issue with newer TypeScript versions.

References

#83

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

This middleware checks a token's scope claim against the provided values raising a 403
insufficient_scope error if none of the provided values exist in the scope claim

Closes #83
@ewanharris ewanharris requested a review from a team as a code owner December 16, 2022 11:41
Co-authored-by: Rita Zerrizuela <[email protected]>
@ewanharris ewanharris merged commit dec4f6f into main Dec 19, 2022
@ewanharris ewanharris deleted the feat/claimIncludesAny branch December 19, 2022 09:26
@ewanharris ewanharris mentioned this pull request Dec 19, 2022
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.

3 participants