<?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: Code X Savage</title>
    <description>The latest articles on DEV Community by Code X Savage (@codexsavage6s).</description>
    <link>https://dev.to/codexsavage6s</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%2F4006354%2F128f2de1-68b0-4fcc-a20d-b99209b500da.png</url>
      <title>DEV Community: Code X Savage</title>
      <link>https://dev.to/codexsavage6s</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codexsavage6s"/>
    <language>en</language>
    <item>
      <title>I Spent Hours Debugging better-auth OAuth… Because I Overthought It</title>
      <dc:creator>Code X Savage</dc:creator>
      <pubDate>Thu, 02 Jul 2026 19:47:15 +0000</pubDate>
      <link>https://dev.to/codexsavage6s/i-spent-hours-debugging-better-auth-oauth-because-i-overthought-it-1j9b</link>
      <guid>https://dev.to/codexsavage6s/i-spent-hours-debugging-better-auth-oauth-because-i-overthought-it-1j9b</guid>
      <description>&lt;p&gt;We’ve all been there: you’re building a Next.js app, hit a wall, and spend hours questioning your entire tech stack—only to realize you overthought the whole thing.&lt;br&gt;
​Recently, I was setting up Google OAuth using better-auth. I followed the docs, which clearly showed the authClient.signIn.social() method.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;​The Next.js Rabbit Hole&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
​My brain made an assumption: "If there is a sign-in endpoint, there must be a separate sign-up endpoint for new users." Believing this, I spent hours debugging and pointing fingers at everything:&lt;br&gt;
​Is better-auth bugged?&lt;br&gt;
​Is react-hook-form failing to pass data?&lt;br&gt;
​Is my database schema blocking new users?&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;​The Fix&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
​I completely overthought it. In better-auth, signIn handles both sign-in AND sign-up automatically. If a user doesn't exist, it creates them. There is no separate sign-up endpoint for OAuth. I was just hitting the wrong endpoint.&lt;br&gt;
​The Lesson&lt;br&gt;
​If the docs only show one method for OAuth, trust it! It does it all.&lt;br&gt;
​Save yourself the headache and don't look for a sign-up endpoint that doesn't exist. 😂&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>oauth</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
