fix: replace broken GitHub login with Clerk auth#1520
Conversation
|
@Abhash-Chakraborty is attempting to deploy a commit to the recode Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. The estimated time for response is 5–8 hrs. In the meantime, please provide all necessary screenshots and make sure you run - npm build run , command and provide a screenshot, a video recording, or an image of the update you made below, which helps speed up the review and assignment. If you have questions, reach out to LinkedIn. Your contributions are highly appreciated!😊 Note: I maintain the repo issue every day twice at 8:00 AM IST and 9:00 PM IST. If your PR goes stale for more than one day, you can tag and comment on this same issue by tagging @sanjay-kv. We are here to help you on this journey of open source. Consistent 20 contributions are eligible for sponsorship 💰 🎁 check our list of amazing people we sponsored so far: GitHub Sponsorship. ✨ 📚Your perks for contribution to this community 👇🏻
If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
|
✅ Synchronized metadata from Issue #322:
|
There was a problem hiding this comment.
Pull request overview
This PR replaces the retired Firebase GitHub login flow with Clerk-based authentication in the Docusaurus site, wiring Clerk into the app shell, navbar, and dashboard leaderboard gating.
Changes:
- Adds Clerk configuration, provider setup, navbar auth UI, and leaderboard sign-in gating.
- Removes Firebase auth code and dependencies.
- Updates related TypeScript declarations, styling, and lockfile/package metadata.
Reviewed changes
Copilot reviewed 17 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.env.example |
Documents Clerk publishable and secret keys. |
docusaurus.config.ts |
Loads local env and exposes Clerk publishable key/custom navbar mount point. |
package.json |
Adds Clerk dependency, removes Firebase packages, updates Node engine. |
package-lock.json |
Updates dependency tree for auth package changes. |
src/components/ui/NavbarClerkAuth.tsx |
Adds Clerk navbar sign-in/user-button portal. |
src/components/ui/NavbarFirebaseAuthGithub.tsx |
Removes Firebase navbar portal. |
src/components/ui/FirebaseAuthGithub.tsx |
Removes Firebase GitHub sign-in component. |
src/lib/firebase.ts |
Removes Firebase initialization. |
src/theme/Root.tsx |
Wraps site content with ClerkProvider when configured. |
src/theme/Layout.tsx |
Swaps Firebase navbar auth for Clerk navbar auth. |
src/pages/dashboard/index.tsx |
Gates leaderboard rendering behind Clerk sign-in. |
src/pages/dashboard/dashboard.css |
Adds styles for leaderboard auth state/button and formatting updates. |
src/css/custom.css |
Updates navbar selectors/styles for Clerk auth control. |
src/theme/Navbar/Content/index.tsx |
Adjusts navbar item key/error handling typing. |
src/types/global.d.ts |
Refines ambient type declarations. |
src/pages/merch/index.tsx |
Adds Framer Motion variant typings. |
src/pages/blogs/index.tsx |
Adds HTMLElement cast for image fallback handling. |
src/components/discussions/DiscussionCard.tsx |
Adds HTMLElement cast for avatar fallback handling. |
src/components/blogCarousel/blogCard.tsx |
Adds HTMLElement cast for image fallback handling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { Show, SignInButton, UserButton } from "@clerk/react"; | ||
| import { createPortal } from "react-dom"; | ||
|
|
||
| const NavbarClerkAuthContent: React.FC = () => { | ||
| return ( | ||
| <div className="clerk-navbar-auth"> | ||
| <Show when="signed-out"> | ||
| <SignInButton mode="modal"> | ||
| <button className="clerk-navbar-sign-in">Sign in</button> | ||
| </SignInButton> | ||
| </Show> | ||
| <Show when="signed-in"> | ||
| <UserButton /> | ||
| </Show> |
|
✅ Synchronized metadata from Issue #322:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@Adez017 |
| import { Show, SignInButton, UserButton } from "@clerk/react"; | ||
| import { createPortal } from "react-dom"; | ||
|
|
||
| const NavbarClerkAuthContent: React.FC = () => { | ||
| return ( | ||
| <div className="clerk-navbar-auth"> | ||
| <Show when="signed-out"> | ||
| <SignInButton mode="modal"> | ||
| <button className="clerk-navbar-sign-in">Sign in</button> | ||
| </SignInButton> | ||
| </Show> | ||
| <Show when="signed-in"> | ||
| <UserButton /> | ||
| </Show> |
| } | ||
|
|
||
| const BlogCard = ({ type, date, title, content, imageUrl, id, authors }) => { | ||
| const [isHovered, setIsHovered] = React.useState(false); |
There was a problem hiding this comment.
why this changes , can you explain ?
|
@Abhash-Chakraborty @sanjay-kv , could you guys confirm we had implemented the correct github sign in ? |
|
I had made a thorough review and found some changes in blogs , discussions and dashboard cards or css , can you provide any clarification on that ? @Abhash-Chakraborty |
The blog, discussion, merch, and dashboard-related edits are small cleanup/type-safety fixes I added while testing the branch, not part of the core auth change. |
There was a problem hiding this comment.
Refined the blog card to use typed props and shared author helpers, and improved author rendering with linked names plus stacked avatars.
There was a problem hiding this comment.
Small cleanup: removed an unused icon import and tightened the image fallback typing so TypeScript can safely handle the DOM element.
There was a problem hiding this comment.
Added the new navbar auth component that shows Clerk sign-in when signed out and the user menu when signed in.
There was a problem hiding this comment.
Added styles for the leaderboard auth gate state and applied some formatting cleanup to existing dashboard CSS.
Screen.Recording.2026-05-16.133417.mp4 |
|
Hi @Abhash-Chakraborty , great work but can we keep the same design as we currently have which shows sign in with GitHub with logo |
@Abhash-Chakraborty something like this
|
|
@sanjay-kv please properly configure prod env in clerk and add variables |

Summary
Testing
Closes #322