<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ghost</title>
    <description>The latest articles on DEV Community by ghost (@ghostnoteai).</description>
    <link>https://dev.to/ghostnoteai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4088991%2F544896a0-eee7-4a58-bb71-4d60d83d021b.png</url>
      <title>DEV Community: ghost</title>
      <link>https://dev.to/ghostnoteai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ghostnoteai"/>
    <language>en</language>
    <item>
      <title>Integrating Ollama into a native desktop app: field notes</title>
      <dc:creator>ghost</dc:creator>
      <pubDate>Fri, 21 Aug 2026 23:58:01 +0000</pubDate>
      <link>https://dev.to/ghostnoteai/integrating-ollama-into-a-native-desktop-app-field-notes-2o6k</link>
      <guid>https://dev.to/ghostnoteai/integrating-ollama-into-a-native-desktop-app-field-notes-2o6k</guid>
      <description></description>
      <category>ollama</category>
      <category>ai</category>
      <category>desktop</category>
      <category>api</category>
    </item>
    <item>
      <title>Our first customer paid four hours after launch, and the app gave him nothing</title>
      <dc:creator>ghost</dc:creator>
      <pubDate>Fri, 21 Aug 2026 23:56:04 +0000</pubDate>
      <link>https://dev.to/ghostnoteai/our-first-customer-paid-four-hours-after-launch-and-the-app-gave-him-nothing-4o45</link>
      <guid>https://dev.to/ghostnoteai/our-first-customer-paid-four-hours-after-launch-and-the-app-gave-him-nothing-4o45</guid>
      <description>&lt;p&gt;Our first paying customer arrived four hours after we flipped the switch on launch day. Stripe showed his $9.99 subscription processed cleanly. Money moved, receipt sent. The app, meanwhile, kept him on the free tier like nothing had happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bug: one config flag
&lt;/h2&gt;

&lt;p&gt;The plan upgrade happens in a Supabase Edge Function that listens for Stripe's webhooks. That function was deployed with &lt;code&gt;verify_jwt = true&lt;/code&gt;. A sensible default for endpoints your signed-in users call, and exactly wrong for a webhook: Stripe's servers don't carry a Supabase JWT, so every event was rejected with a 401 before a single line of our code ran.&lt;/p&gt;

&lt;p&gt;The fix was one line. Turn off JWT verification for that endpoint and authenticate the webhook the way Stripe intends, by verifying Stripe's signature on the payload.&lt;/p&gt;

&lt;h2&gt;
  
  
  The decision
&lt;/h2&gt;

&lt;p&gt;That still left a customer who had paid and received nothing for half an hour. Two options: refund him and ask him to try again, or make it right unilaterally. We comped him a lifetime license as customer number one. He's still around.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bonus find
&lt;/h2&gt;

&lt;p&gt;Reading the same code in a panic surfaced something worse than the bug we were looking for: a row-level security gap that would have let any logged-in user update the plan column on their own row. Effectively &lt;code&gt;plan='lifetime'&lt;/code&gt; for free, no Stripe involved. Never exploited, closed the same evening.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you sell through Supabase
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Webhook endpoints don't get JWTs.&lt;/strong&gt; Disable &lt;code&gt;verify_jwt&lt;/code&gt; on them and verify the provider's signature instead. The 401 happens before your code runs, so no log you wrote will show you why.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit RLS on every column a user could want to change.&lt;/strong&gt; Plan, role and credit fields especially. Deny by default; only your service role touches entitlements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run a real dollar through production before launch.&lt;/strong&gt; Test mode exercises your code. It does not exercise your configuration, and configuration is what failed here.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://www.ghostnoteai.dev/blog/first-customer-webhook-401" rel="noopener noreferrer"&gt;GhostNote blog&lt;/a&gt;. GhostNote is an invisible AI overlay for Windows and Mac.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>stripe</category>
      <category>supabase</category>
      <category>webdev</category>
      <category>startup</category>
    </item>
  </channel>
</rss>
