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

typescript middleware #1478

Open
shravanthanvi opened this issue Oct 14, 2024 · 4 comments
Open

typescript middleware #1478

shravanthanvi opened this issue Oct 14, 2024 · 4 comments

Comments

@shravanthanvi
Copy link

in typescript could not find middleware package

@fredr
Copy link
Member

fredr commented Oct 25, 2024

It is coming soon!

Out of curiosity, what do you intend to implement as middlewares?

@shravanthanvi
Copy link
Author

JWT validation client check input validations
in express i write some thing like this
router.put("/", verifyJwt, rateLimitLogin, vEditProfile, pEditProfile, mEditProfile);

is there any alternative to this

@shravanthanvi
Copy link
Author

v stands for input validation p stands for permissions to use API etc

@fredr
Copy link
Member

fredr commented Nov 6, 2024

For token validation and authenticating you want to use a auth handler: https://encore.dev/docs/ts/develop/auth

For input validation it depends a bit on what you need, encore validates all requests against the typescript types you define for your endpoints.

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

No branches or pull requests

2 participants