Server Action missing session check
Mutation trusts the caller identity without verifying the session before updating a subscription. Call your auth helper before any write.
Before
export async function updatePlan(planId: string) {
await db.subscription.update({ planId });
}Suggested direction
export async function updatePlan(planId: string) {
const user = await requireUser();
await db.subscription.update({ userId: user.id, planId });
}