Ape R Us
06/10/2022, 3:00 AMNeedle
06/10/2022, 3:00 AMgaryaustin
06/10/2022, 3:32 AMApe R Us
06/10/2022, 3:50 AMApe R Us
06/10/2022, 3:51 AMApe R Us
06/10/2022, 3:51 AMScott P
06/10/2022, 3:56 AMinsert()
will tell users what fields are missing data, and your public key isn't secret, it will be extremely easy for any authenticated user to simply add an insert record from the client, making any sort of reliable audit trail impossible to maintain.Ape R Us
06/10/2022, 3:59 AMApe R Us
06/10/2022, 4:00 AMScott P
06/10/2022, 4:01 AMScott P
06/10/2022, 4:07 AMjs
await stripe.customers.create({
metadata: {
user_id: your_supabase_user_id,
},
});
The Stripe docs are the best way to figure out how best to proceed depending on your specific use case.
The main point is that when dealing with anything related to payments, even if you're using something like Stripe to handle the payment processing, the client shouldn't be where you handle updating the database to say a user has paid - it should always go through a backend server where the user can't mess with the data or (easily) send fake requestsApe R Us
06/10/2022, 4:08 AM