← All questionsCan the charge nurse approve swaps without an account? Supabase RLS blocks everything anonymous
About Supabase and Lovable
Swap Board is Lovable + Supabase. Nurses log in with email, fine. But the charge nurse is a rotating role, a different person every shift, and none of them want to make an account. I tried the anon key and RLS says no to every update.
Replies
Different take: keep it anonymous but make approval a signed link. When someone claims a shift, your edge function texts the charge phone a link with a one-time token, tapping it approves. No login, and RLS stays strict because the function uses the service role.
Sep 12Zaina, Willa and Tomás R. agree
I’d give the charge desk one shared login and a big Approve button. Not elegant but the desk is one place. In my kitchen the pass has one iPad logged in as ‘pass’ and nobody has ever complained.
Sep 12Tyrell and Una D. agree
Supabase also has anonymous sign-ins now, so a phone can hold a session without an email. You’d still need a policy that says which anonymous sessions can approve, which is your actual problem again.
Yesterday
Sign in to reply.
Replies sit in the order people agree with them; the ones the asker marks “helped” lead. Names, never a number.