Fix nextjs quickstart middleware pattern to use asgardeoMiddleware#456
Conversation
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (3)
📝 WalkthroughWalkthroughUpdate Next.js Quickstart examples to use ChangesQuickstart Documentation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/nextjs/QUICKSTART.md`:
- Around line 214-219: The documentation example passes the configuration object
as the first argument to asgardeoMiddleware, but the function signature expects
an optional handler as the first parameter and options as the second; update the
example so the options object (containing signInUrl) is provided as the second
argument to asgardeoMiddleware, e.g. call asgardeoMiddleware with undefined for
the handler when you only need options, or pass your handler function first and
the options object second (references: asgardeoMiddleware, handler, options,
signInUrl).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1d9805a2-85aa-4976-b4b3-d7219e04cf86
📒 Files selected for processing (1)
packages/nextjs/QUICKSTART.md
|
Ideally we should not have these @udanfernando2006 Can you please check if the Documentation is up to date: https://wso2.com/asgardeo/docs/quick-starts/nextjs/ And please update the PR to remove all the following files.
|
|
Thanks for the update. The official docs at https://wso2.com/asgardeo/docs/quick-starts/nextjs/ are already up to date, as it has separate tabs for "Next.js 16 and later" (proxy.ts) and "Next.js 15 and earlier" (middleware.ts). I'll update the PR to remove all three |
|
Updated. Removed all three QUICKSTART.md files. I also updated the |

Purpose
The QUICKSTART.md was using outdated API patterns (
new AsgardeoNext()with.middleware()method) that don't match the current SDK implementation. This could confuse developers following the guide, as the code wouldn't work.Updated to use the correct
asgardeoMiddlewarefunction exported from@asgardeo/nextjs/server, which aligns with the official Asgardeo documentation.Related Issues
Related PRs
Checklist
Security checks
Summary by CodeRabbit