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

feat(nextjs,shared,backend,clerk-react): Introduce Protect for authorization #2170

Merged
merged 26 commits into from
Dec 11, 2023

Commits on Dec 11, 2023

  1. Configuration menu
    Copy the full SHA
    5f5bf7e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9893370 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fb1bed5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    153140b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ca8c64d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    be5aaee View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    bf3cf34 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    1a112db View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a91dc74 View commit details
    Browse the repository at this point in the history
  10. feat(types,nextjs,clerk-react,backend): Rename Gate to Protect

    - Drop `some` from the `has` utility and Protect. Protect now accepts a `condition` prop where a function is expected with the `has` being exposed as the param.
    - Protect can now be used without required props. In this chae behaves as `<SignedIn>` if no authorization props are passed.
    - `has` will throw an error if neither `permission` or `role` is passed.
    panteliselef committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    a55afe8 View commit details
    Browse the repository at this point in the history
  11. feat(nextjs): Introduce auth().protect() for App Router

    Allow per page protection in app router. This utility will automatically throw a 404 error if user is not authorized or authenticated.
    When `auth().protect()` is called
    - inside a page or layout file it will render the nearest `not-found` component set by the developer
    - inside a route handler it will return empty response body with a 404 status code
    panteliselef committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    6984390 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    367a3b3 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    4dc9b9f View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    7a218c7 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    3f154ad View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d4f7d49 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    1d323ad View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    a8d61dc View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    48d64c5 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    e3a4c23 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    819b6a0 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    3c6e17e View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    64ad323 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    87ea852 View commit details
    Browse the repository at this point in the history
  25. Revert "fix(nextjs,clerk-react,backend): Utility has is undefined w…

    …hen user is signed out"
    
    This reverts commit cf736cc
    panteliselef committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    584c71c View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    79fff5a View commit details
    Browse the repository at this point in the history