Skip to content

fix(auth): allow unauthenticated access to quiz and leaderboard pages#75

Merged
ViktorSvertoka merged 1 commit into
developfrom
sl/feat/quiz
Dec 22, 2025
Merged

fix(auth): allow unauthenticated access to quiz and leaderboard pages#75
ViktorSvertoka merged 1 commit into
developfrom
sl/feat/quiz

Conversation

@LesiaUKR
Copy link
Copy Markdown
Collaborator

@LesiaUKR LesiaUKR commented Dec 21, 2025

  • Remove auth guard from /quiz and /leaderboard routes (guest flow support)
  • Update header navigation to point to /quizzes list instead of specific quiz
  • Keep /dashboard protected as it contains user-specific data"

Summary by CodeRabbit

  • Changes
    • Updated Quiz navigation link to point to the new Quizzes page.
    • Adjusted authentication requirements—Leaderboard and Quiz sections are now accessible without authentication; Dashboard remains login-protected.

✏️ Tip: You can customize this high-level summary in your review settings.

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 21, 2025

Deploy Preview for develop-devlovers ready!

Name Link
🔨 Latest commit 583ef36
🔍 Latest deploy log https://app.netlify.com/projects/develop-devlovers/deploys/694885c24af5e300089bc7c1
😎 Deploy Preview https://deploy-preview-75--develop-devlovers.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 21, 2025

Walkthrough

Two localized changes update navigation and authentication handling. The navigation constant replaces a specific React quiz link with a general quizzes page link. The proxy middleware is simplified to enforce authentication only for dashboard paths, removing checks previously applied to leaderboard and quiz paths.

Changes

Cohort / File(s) Summary
Navigation link update
frontend/lib/navigation.ts
Changed navigation constant entry from { href: '/quiz/react-fundamentals', label: 'Quiz' } to { href: '/quizzes', label: 'Quizzes' }
Authentication middleware simplification
frontend/proxy.ts
Replaced multi-path auth redirect logic (leaderboard, quiz, dashboard) with single-path check that enforces authentication only for dashboard paths

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that the /quizzes route exists and is properly implemented
  • Confirm that removal of auth enforcement for /leaderboard and /quiz paths does not break access control for those routes
  • Ensure /dashboard authentication requirement remains fully functional

Possibly related PRs

Suggested reviewers

  • AM1007
  • ViktorSvertoka

Poem

🐰 A hop and a skip through the quiz route,
Now pointing to quizzes, no longer afoot,
Dashboard stands guarded, the auth reigns true,
Leaderboard dances free—a hop-happy crew! 🎯

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: allowing unauthenticated access to quiz and leaderboard pages by removing auth guards, which is directly reflected in the proxy.ts modifications.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sl/feat/quiz

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7e1c1e0 and 583ef36.

📒 Files selected for processing (2)
  • frontend/lib/navigation.ts (1 hunks)
  • frontend/proxy.ts (1 hunks)
🔇 Additional comments (2)
frontend/lib/navigation.ts (1)

3-3: Navigation link update looks good.

The change from a specific quiz route to a general quizzes list page improves navigation UX and aligns with the PR objective.

frontend/proxy.ts (1)

34-39: Authentication scope correctly narrowed to dashboard.

The authentication middleware properly restricts auth enforcement to /dashboard paths only, allowing guest access to /quiz and /leaderboard routes. Both routes exist and handle unauthenticated users correctly without exposing sensitive data.


Comment @coderabbitai help to get the list of available commands and usage tips.

@ViktorSvertoka ViktorSvertoka merged commit 7398bcb into develop Dec 22, 2025
5 checks passed
@ViktorSvertoka ViktorSvertoka deleted the sl/feat/quiz branch December 22, 2025 07:09
@LesiaUKR LesiaUKR restored the sl/feat/quiz branch December 22, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants