I have created some custom endpoints but they are unprotected by default. How can I use Payload auth or user API keys to protect them?
I have gone through the following but they don't cover a custom endpoint case:
https://payloadcms.com/docs/authentication/config#doc <-- only Collection based, not custom endpoint.
https://payloadcms.com/docs/authentication/overview#token-based-auth <-- covers how to authenticate using JWT token, not API Key.
I have custom endpoints both on App level and Collection level. Neither seem to play nice with Payload authenticate middlewares when using API Keys.