-
Notifications
You must be signed in to change notification settings - Fork 0
[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
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
β¦rection on error
β¦les and update logout functionality in Navbar
There was a problem hiding this 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
nextjs-openai-integration-demo/packages/global-ui/src/CookieBanner/index.tsx
Lines 85 to 88 in ee98779
// Redirect to Google homepage | |
window.location.href = 'https://www.google.com'; | |
}; |
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
nextjs-openai-integration-demo/packages/global-ui/src/CookieBanner/index.tsx
Lines 105 to 148 in ee98779
<> | |
{/* 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
nextjs-openai-integration-demo/packages/global-ui/src/CookieBanner/index.tsx
Lines 86 to 87 in ee98779
// Redirect to Google homepage | |
window.location.href = 'https://www.google.com'; |
Was this report helpful? Give feedback by reacting with π or π
π Overview
This PR migrates the authentication system from Clerk to NextAuth.js, providing a more customizable and self-hosted authentication solution.
β¨ Changes Made
οΏ½οΏ½ Technical Details