Skip to content

fix: JWT validation in middleware, redirect param, static imports (#494, #495, #496) - #657

Merged
DeFiVC merged 2 commits into
ChainLearnOfficial:mainfrom
Noragiftfr:fix/middleware-connect-progress
Oct 20, 2026
Merged

DeFiVC merged 2 commits into
ChainLearnOfficial:mainfrom
Noragiftfr:fix/middleware-connect-progress

Conversation

@Noragiftfr

@Noragiftfr Noragiftfr commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Closes #494
Closes #495
Closes #496
Closes #497

What changed

#495 - JWT validation in middleware

Middleware now decodes the JWT using atob() and checks the exp claim, redirecting expired or malformed tokens to /connect. Works in Edge runtime without external dependencies.

#494 - Connect page respects redirect param

Connect page reads the redirect search param set by middleware and uses it for post-login navigation. Falls back to /dashboard when no param is present.

#496 - Static imports in connect page

Moved dynamic imports of getProfile and useAuthStore to static top-level imports, removing per-click module resolution latency and making the code easier to follow.

#497 - course-progress-card.tsx (noted)

The file referenced in the issue does not exist in the current codebase. The module count display appears in course/[courseId]/page.tsx but does not have the X of Y modules format described. Would need the file to be created first.

…ainLearnOfficial#494, ChainLearnOfficial#495, ChainLearnOfficial#496)

- ChainLearnOfficial#495: Middleware now validates JWT expiry using atob() base64 decode,
  redirecting expired/malformed tokens to /connect
- ChainLearnOfficial#494: Connect page reads redirect param from middleware and uses it
  for post-login navigation instead of always going to /dashboard
- ChainLearnOfficial#496: Moved dynamic imports of getProfile and useAuthStore to static
  top-level imports in connect page
@netlify

netlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for chainlearn failed.

Name Link
🔨 Latest commit d75dd42
🔍 Latest deploy log https://app.netlify.com/projects/chainlearn/deploys/6ad78c9c3995e467ef0a93cb

@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@Noragiftfr Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@DeFiVC
DeFiVC merged commit 9e07688 into ChainLearnOfficial:main Oct 20, 2026
1 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants