Check if the user is authenticated
To protect your API endpoints, you can use thehonoAuthMiddlewareWrap
in your router or on a specific endpoint.
hello/index.ts
honoAuthMiddlewareWrap
will also provide the auth
infromation to the endpoint. If the handler is reached, both objects are available in the auth
.
hello/index.ts