marmelab / ra-supabase

Supabase adapter for react-admin, the frontend framework for building admin applications on top of REST/GraphQL services.
MIT License
156 stars 27 forks source link

Fix `authProvider.getPermissions()` should not throw error when not logged in #79

Closed fzaninotto closed 3 weeks ago

fzaninotto commented 3 weeks ago

Problem

The current setup disallows unauthenticated custom routes: the user is redirected to login.

Solution

If no user is logged in, getPermissions should return undefined instead of redirecting to login.