Extract Nuxt SDK API route paths into shared constants - #88
Merged
brionmario merged 1 commit intoAug 20, 2026
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 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 |
Signed-off-by: janithjay <janithjayashan018@gmail.com>
janithjay
force-pushed
the
fix/nuxt-api-route-constants
branch
from
August 20, 2026 09:17
c4c0de7 to
482feb4
Compare
brionmario
approved these changes
Aug 20, 2026
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.
Purpose
Nuxt SDK runtime modules repeated
/api/auth/*route string literals acrossmodule.ts, composables, plugins, middleware, and the SSR Nitro plugin. This risked routes drifting out of sync if one call site was updated without the others.Approach
Added
packages/nuxt/src/runtime/constants/NuxtAPIRoutes.tsas the single source of truth for all/api/auth/*paths (SIGN_IN,SIGN_UP,SIGN_OUT,CALLBACK,SESSION,TOKEN,META,USER,USER_PROFILE), following the same typed-constants-object pattern already used elsewhere in the monorepo (e.g.VendorConstants).Replaced every route string literal with
NuxtAPIRoutes.*:module.ts- Nitro server handler registrationruntime/components/ThunderIDRoot.ts- profile fetch/update, flow metadata fetchruntime/composables/useThunderID.ts- sign-in/sign-up/sign-outruntime/plugins/thunderid.ts- sign-in/sign-up/sign-out, access tokenruntime/middleware/defineThunderIDMiddleware.ts- default redirect pathruntime/server/plugins/thunderid-ssr.ts- OAuth callback URLRequest methods and route behavior are unchanged - this is a pure literal-to-constant extraction.
Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks