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
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 thoughwith out payemnt gateway , i can see that is happening , but when i try include payemnt gateway , then it not working , then problem is wehbook
What do you mean it's not working with payment gateway? What is the problem with the webhook?
I use whop payments gateway i need webhook url end point url from supabase and record the event
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

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