WaspW
Wasp•7mo ago•
65 replies
Captain Incredible

auth on api endpoints

I'm reading the docs, but still confused as to how to enable cookie-based auth out of the box. The documentation says that if i set auth: true on the api endpoint, that i will have to parse the jwt myself. But if i set it to false then there will be no auth (see payments webhook for example) If i leave auth blank, you would think that it would by default do cookie auth right? https://wasp.sh/docs/advanced/apis#using-entities-in-apis
If auth is enabled, this will default to true and provide a context.user object. If you do not wish to attempt to parse the JWT in the Authorization Header, you should set this to false.


I've tried things many different ways but haven't gotten it to work đŸ˜¦
Was this page helpful?