Repository navigation
fix: JWT validation in middleware, redirect param, static imports (#494, #495, #496) - #657
Merged
DeFiVC merged 2 commits intoOct 20, 2026
Conversation
…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
❌ Deploy Preview for chainlearn failed.
|
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.