Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 | ||
| }, |
There was a problem hiding this comment.
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
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.
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.
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
NavBarcomponent so users regain logout controls and associated branding assets. Harden the hosted sample by locking in env/build expectations, Nuxt defaults, andNuxtAuthHandler/Descope auth session/provider settings along with Vercel routing metadata to keep deployments stable.NavBarusage so the sample flow shows navigation controls for logging out and keeps the Descope brand icon available in assets.Modified files (2)
Latest Contributors(1)
Modified files (1)
Latest Contributors(1)
package.json, shipping environment defaults, aligning Nuxt/Vite/Nitro defaults including caching-friendly routing, and tightening the DescopeNuxtAuthHandlersession/authorization strategy to work on Vercel.Modified files (8)
Latest Contributors(2)