javascript
javascript copied to clipboard
feat(express): Introduce Clerk package for Express
Description
Introduce Express specific Clerk SDK @clerk/express. The SDK exposes the following API:
clerkClient: default @clerk/backend client initialized from env variables and used to make BAPI requestsclerkMiddleware: centralized middleware that authenticates all requests without blocking them (also triggers handshake mechanism)getAuth: utility to retrieve the auth state from the request (requires clerkMiddleware to executed)requireAuth: middleware that returns http 401 response when request is signed-out
Also all the top level exports from @clerk/backend are re-exported from @clerk/express top level.
Checklist
- [ ]
npm testruns as expected. - [ ]
npm run buildruns as expected. - [ ] (If applicable) JSDoc comments have been added or updated for any package exports
- [ ] (If applicable) Documentation has been updated
Type of change
- [ ] 🐛 Bug fix
- [x] 🌟 New feature
- [ ] 🔨 Breaking change
- [ ] 📖 Refactoring / dependency upgrade / documentation
- [ ] other:
TODOs
- [x] Add tests
- [ ] Add examples
- [x] Replace all
TODO(express)TODOs - [ ] Use this package to create separate page in backend-request/handling docs
🦋 Changeset detected
Latest commit: 55d9b64d3dda2563ba4de99e07c1a7707389492f
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @clerk/express | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
@LekoArts, @nikosdouvlis Could you take another look at this PR?