Backend configuration for payment , auth and realtime message

Hi i am new here , i have come here to get some help. For role based authentication for my application how to set up ? Can an integrated payment platform like whop, i need supervisor this I am using ai platform to build. This saas application
7 Replies
ihm40
ihm404w ago
i think the most common route i have seen is people create an additional table such as profiles or tenants which has a one to one mapping with users (or many to one if b2b saas) and a column that is called role which you can create a enumerated type of typeA user type B user etc then if you wan't you can write RLS policies to make use of these roles either directly or create some database functions that can check which role any user making a request is such is is_org_admin is_org_owner etc this is what i would do, others may have better ideas though
Naveed
NaveedOP4w ago
with out payemnt gateway , i can see that is happening , but when i try include payemnt gateway , then it not working , then problem is wehbook
ihm40
ihm404w ago
What do you mean it's not working with payment gateway? What is the problem with the webhook?
Naveed
NaveedOP4w ago
I use whop payments gateway i need webhook url end point url from supabase and record the event
ihm40
ihm404w ago
The webhook url end point is usually the edge function that you use to process payment transactions. You can find it on the edge functions page and pressing the clipboard on the edge function
ihm40
ihm404w ago
No description
ihm40
ihm404w ago
Here is an example ^ If you are recording the event to the database then you just need to create a supabase client in your edge function that receives requests and writes to the table

Did you find this page helpful?