-
Refine
A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
In the last episode, we explored refine's auth and data providers in significant detail. We saw that 's dataProvider and authProvider props were set to support Supabase thanks to the @pankod/refine-supabase package.
-- Create a table for public users create table users ( id uuid references auth.users not null primary key, updated_at timestamp with time zone, username text unique, full_name text, avatar_url text ); -- This trigger automatically creates a public.users entry when a new user signs up via Supabase Auth. -- See https://supabase.com/docs/guides/auth/managing-user-data#using-triggers for more details. create or replace function public.handle_new_public_user() returns trigger as $$ begin insert into public.users (id, full_name, avatar_url) values (new.id, new.raw_user_meta_data->>'full_name', new.raw_user_meta_data->>'avatar_url'); return new; end; $$ language plpgsql security definer; create trigger on_auth_user_created after insert on auth.users for each row execute procedure public.handle_new_public_user(); -- Set up Storage! insert into storage.buckets (id, name) values ('avatars', 'avatars'); -- Set up access controls for storage. -- See https://supabase.com/docs/guides/storage#policy-examples for more details. create policy "Avatar images are publicly accessible." on storage.objects for select using (bucket_id = 'avatars'); create policy "Anyone can upload an avatar." on storage.objects for insert with check (bucket_id = 'avatars');
Related posts
-
Robust Form - A simple and easy to use Form Builder application like Google Form.
-
refine + DEV Open Source Hackathon 2 - Pre-Announcement
-
#refineweek: Audit Log With refine
-
PublishWise: The one place to write and publish your blogs
-
How to add Twitter auth quickly with Supabase to your Next.js site ⚡