Can't use auth.uid() inside functions

Hey guys, I can promise you I could used
auth.uid()
and auth.email() inside my PostgreSQL functions like over a week ago. That's how I wrote my delete_user which I use with .rpc() from code:
begin
raise log 'auth.uid(): %', auth.uid();
delete from auth.users where id = auth.uid();
end;

But now I noticed I can't delete my users anymore and I can see from logs the reason is that
auth.uid()
returns me <NULL>. It doesn't matter whether I do SECURITY DEFINER or SECURITY INVOKER for my func.
auth.email() doesn't work as well.
Did something happen over this week?
Was this page helpful?