Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Codex/Cursor] Migrate from Clerk to NextAuth #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 12, 2025

Conversation

alex-suprun-git
Copy link
Owner

πŸš€ Overview

This PR migrates the authentication system from Clerk to NextAuth.js, providing a more customizable and self-hosted authentication solution.

✨ Changes Made

  • Authentication Provider: Replaced Clerk with NextAuth.js
  • Sign-in/Sign-up Pages: Updated authentication pages with improved UI and error handling
  • Internationalization: Enhanced auth pages with proper i18n support
  • Error Handling: Improved error messages and user feedback
  • Dependencies: Updated and cleaned up authentication-related dependencies

οΏ½οΏ½ Technical Details

  • Implemented NextAuth.js configuration with proper session handling
  • Updated API routes to work with NextAuth.js
  • Enhanced accessibility features in authentication forms
  • Added proper TypeScript types for authentication

@alex-suprun-git alex-suprun-git self-assigned this Jul 12, 2025
Copy link

vercel bot commented Jul 12, 2025

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
nextjs-openai-platform βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jul 12, 2025 4:51pm
nextjs-openai-public βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jul 12, 2025 4:51pm

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Unexpected Redirect After Cookie Rejection

Rejecting cookies via the banner unexpectedly redirects users to https://www.google.com. This unintended behavior disrupts the user experience, as users typically expect to remain on the current site or be directed to a privacy policy, not an external website, despite the rejection cookie being set.

packages/global-ui/src/CookieBanner/index.tsx#L85-L88

// Redirect to Google homepage
window.location.href = 'https://www.google.com';
};

Fix in Cursor β€’ Fix in Web


Bug: Cookie Banner Blocks Interactions, Redirects Unexpectedly

The cookie banner introduces aggressive user experience issues: it displays a full-screen overlay that blocks all user interactions until cookies are accepted, and unexpectedly redirects users to https://www.google.com when they reject cookies. This behavior is likely unintended.

packages/global-ui/src/CookieBanner/index.tsx#L105-L148

<>
{/* Full-screen overlay to block all interactions */}
<div className="fixed inset-0 bg-black bg-opacity-50 z-40 pointer-events-auto" />
{/* Cookie banner positioned above the overlay */}
<div className="fixed border-t-1 border-black bottom-0 left-0 right-0 z-50 p-4 bg-gray-900 shadow-lg">
<div className="container mx-auto">
<div className="flex flex-col sm:flex-row items-start justify-between gap-4">
<div className="max-w-2xl">
<h2 className="text-lg mb-2 font-semibold">
{translations.title}
</h2>
<p className="text-sm">{translations.description}</p>
{hasTypes && (
<p className="mt-1 mb-1 text-xs text-slate-400">
{cookieTypes.join(' β€’ ')}
</p>
)}
{translations.learnMore && translations.policyLink && (
<a
href="#"
className="mt-1 inline-block text-yellow-200 hover:underline text-xs">
{translations.learnMore}
</a>
)}
</div>
<div className="flex gap-2 self-end">
<button
onClick={handleReject}
className="btn bg-red-800 hover:bg-red-900 btn-sm">
{translations.rejectButton}
</button>
<button
onClick={handleAccept}
className="btn bg-yellow-200 hover:bg-yellow-300 text-black btn-sm">
{translations.acceptButton}
</button>
</div>
</div>
</div>
</div>
</>

packages/global-ui/src/CookieBanner/index.tsx#L86-L87

// Redirect to Google homepage
window.location.href = 'https://www.google.com';

Fix in Cursor β€’ Fix in Web


Was this report helpful? Give feedback by reacting with πŸ‘ or πŸ‘Ž

@alex-suprun-git alex-suprun-git merged commit 7f86160 into main Jul 12, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant