Skip to content

fixed the nuxt sample app#3

Open
mrunankpawar wants to merge 5 commits intomainfrom
fixes
Open

fixed the nuxt sample app#3
mrunankpawar wants to merge 5 commits intomainfrom
fixes

Conversation

@mrunankpawar
Copy link

@mrunankpawar mrunankpawar commented Sep 20, 2025

User description

Fixed the Nuxt Sample App by restoring the missing navbar, which was preventing users from logging out.


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Restore the Nuxt app navigation by re-adding the shared NavBar component so users regain logout controls and associated branding assets. Harden the hosted sample by locking in env/build expectations, Nuxt defaults, and NuxtAuthHandler/Descope auth session/provider settings along with Vercel routing metadata to keep deployments stable.

TopicDetails
Navigation Flow Restore NavBar usage so the sample flow shows navigation controls for logging out and keeps the Descope brand icon available in assets.
Modified files (2)
  • .vercel/output/static/img/descope-logo.png
  • app.vue
Latest Contributors(1)
UserCommitDate
kevinjamesgao@gmail.comadded-final-version-of...August 22, 2023
Other Other files
Modified files (1)
  • package-lock.json
Latest Contributors(1)
UserCommitDate
kevinjamesgao@gmail.comadded-final-version-of...August 22, 2023
Deploy & Auth Harden the deployment and auth infrastructure by clarifying runtime requirements in package.json, shipping environment defaults, aligning Nuxt/Vite/Nitro defaults including caching-friendly routing, and tightening the Descope NuxtAuthHandler session/authorization strategy to work on Vercel.
Modified files (8)
  • .env.example
  • .gitignore
  • .vercel/output/config.json
  • .vercel/output/nitro.json
  • nuxt.config.ts
  • package.json
  • server/api/auth/[...].ts
  • vercel.json
Latest Contributors(2)
UserCommitDate
iddo.mayblum@descope.comeu-regional-supportJune 24, 2024
kevinjamesgao@gmail.comadded-final-version-of...August 22, 2023
This pull request is reviewed by Baz. Review like a pro on (Baz).

@vercel
Copy link

vercel bot commented Sep 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
nuxt-sample-app Ready Ready Preview Comment Oct 1, 2025 8:36pm

Comment on lines 6 to +10
modules: ['@nuxtjs/tailwindcss', '@sidebase/nuxt-auth'],
auth: {
origin: process.env.ORIGIN,
origin: process.env.ORIGIN || 'http://localhost:3000',
enableGlobalAppMiddleware: true
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auth.origin now defaults to http://localhost:3000 when ORIGIN is unset, so a deployed app without ORIGIN configured will build oauth callbacks/redirects against localhost instead of the real host and the callback will fail; can we keep the previous behavior (letting Nuxt Auth autodetect the host) or require ORIGIN explicitly?

Finding type: Breaking Changes | Severity: 🔴 High


Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

Prompt for AI Agents:

In nuxt.config.ts around lines 6 to 10, the auth configuration currently sets origin to
a default ('http://localhost:3000') when process.env.ORIGIN is unset, which breaks OAuth
in deployed environments. Change this so the origin property is only included when
process.env.ORIGIN is defined (omit the origin key entirely when it's unset so Nuxt Auth
can autodetect), or alternatively enforce ORIGIN by throwing a clear error at build time
if it is missing. Implement this by conditionally building the auth object (e.g. only
add origin if process.env.ORIGIN) instead of assigning a localhost default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant