Authenticated and unauthenticated requests to same endpoint

Currently endpoints in Xano can either be authenticated or unauthenticated - and if endpoint is set to unauthenticated then even simply referencing auth.id results in ERROR_CODE_ACCESS_DENIED

How to handle scenario where endpoint should return results for auth and non-auth users without duplicating endpoints?
Let's use GET /items endpoint as the example where items can have public or private status, endpoint should return only public items for unauthenticated users and all items for authenticated users.

2 replies