Fix Nuxt session cookie name resolution and token request auth method - #51
Fix Nuxt session cookie name resolution and token request auth method#51janithjay wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 36 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR updates Nuxt session cookie helpers for vendor-specific names. It also updates the Nuxt quickstart configuration with ThunderID token authentication and removes obsolete environment variables. ChangesNuxt integration updates
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Pull request overview
Fixes Nuxt SDK sign-in issues by correcting server-side session cookie name derivation and updating the Nuxt quickstart to use a token endpoint client authentication method compatible with the target IdP.
Changes:
- Update Nuxt server session cookie name helpers to use
CookieConfig.get*CookieName(...)instead of non-existent static properties. - Configure the Nuxt quickstart to use
tokenRequest.authMethod: 'client_secret_post'. - Simplify the quickstart
.env.exampleentries (but note the remaining doc/config references toNUXT_PUBLIC_THUNDERID_APPLICATION_ID).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| samples/nuxt/quickstart/nuxt.config.ts | Adds thunderid.tokenRequest.authMethod override and cleans up config ordering. |
| samples/nuxt/quickstart/.env.example | Removes several previously documented env vars from the quickstart example file. |
| packages/nuxt/src/runtime/server/utils/session.ts | Fixes cookie name generation by using CookieConfig static methods. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export function getSessionCookieName(vendor?: string): string { | ||
| return CookieConfig.getSessionCookieName(vendor); | ||
| } |
Purpose
Fixes two issues preventing
sign inin the@thunderid/nuxtSDK and quickstart sample app:getSessionCookieName()andgetTempSessionCookieName()inpackages/nuxt/src/runtime/server/utils/session.tsevaluated static property access (CookieConfig.SESSION_COOKIE_NAMEandCookieConfig.TEMP_SESSION_COOKIE_NAME), which returnedundefined. This caused session cookies to be saved under the literal cookie name"undefined"instead of the configured vendor prefix (e.g.__thunderid__session).client_secret_basic) caused token exchange to fail with anunauthorized_clienterror when the Identity Provider expected credentials in the request body. ConfiguredtokenRequest.authMethodtoclient_secret_postinsamples/nuxt/quickstart/nuxt.config.ts.Approach
getSessionCookieName()andgetTempSessionCookieName()inpackages/nuxt/src/runtime/server/utils/session.tsto call static methodsCookieConfig.getSessionCookieName(vendor)andCookieConfig.getTempSessionCookieName(vendor).thunderid.tokenRequest.authMethod: 'client_secret_post'insamples/nuxt/quickstart/nuxt.config.ts.Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks
Summary by CodeRabbit
New Features
Chores