-
Notifications
You must be signed in to change notification settings - Fork 16
feat: implement social sign-in for Google, GitHub, and Microsoft with configuration support #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0e4d4bd
feat: implement social sign-in for Google, GitHub, and Microsoft with…
JoachimLK d8d0e6e
feat: update button styles for social sign-in and sign-up to improve …
JoachimLK 6b7b699
feat: add Nitro plugin to recompute public auth-provider flags at ser…
JoachimLK 39e098e
feat: add docker entrypoint script to derive NUXT_PUBLIC_* flags from…
JoachimLK ad91cc9
feat: refactor authentication handling to use runtime-config for prov…
JoachimLK aaae17f
feat: enhance authentication security with stricter password policy, …
JoachimLK 6acaf3d
Refactor code structure for improved readability and maintainability
JoachimLK b94ffd9
feat: streamline authentication configuration by removing deprecated …
JoachimLK File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
In Nuxt 4, if runtimeConfig.public values are computed from process.env.AUTH_* inside nuxt.config.ts, are those values fixed at config/build evaluation unless overridden by NUXT_PUBLIC_* runtime env vars?💡 Result:
Yes, in Nuxt 4, if runtimeConfig.public values are computed from process.env.AUTH_* (e.g., process.env.AUTH_SECRET) inside nuxt.config.ts, those values are fixed at build/config evaluation time. They can only be overridden at runtime by the corresponding NUXT_PUBLIC_* environment variables (e.g., NUXT_PUBLIC_AUTH_SECRET for public.runtimeConfig.authSecret). The official Nuxt documentation explicitly states: "Setting the default of runtimeConfig values to differently named environment variables (for example setting myVar to process.env.OTHER_VARIABLE) will only work during build-time and will break on runtime." Runtime overrides only work with matching NUXT_ prefixed variables that follow the runtimeConfig structure.
Citations:
🏁 Script executed:
Repository: reqcore-inc/reqcore
Length of output: 1072
🏁 Script executed:
Repository: reqcore-inc/reqcore
Length of output: 143
🏁 Script executed:
Repository: reqcore-inc/reqcore
Length of output: 13558
Public social flags are fixed at build time while server-side providers are evaluated at runtime, causing UI/backend mismatch in runtime-only deployments.
Lines 225-239 compute
authGoogleEnabled,authGithubEnabled, andauthMicrosoftEnabledfromprocess.env.AUTH_*insidenuxt.config.ts. In Nuxt 4, these build-time values are frozen intoruntimeConfig.publicand cannot be changed at runtime unless overridden by correspondingNUXT_PUBLIC_*environment variables.However,
server/utils/auth.ts(lines 167–193) evaluates the sameAUTH_*variables at runtime whengetAuth()is first called. This creates a critical mismatch:AUTH_*vars are not set at build time but injected at runtime (common in Railway and similar platforms), the UI flags remainfalsewhile the server can enable providers — users won't see the buttons despite functional backends.AUTH_*vars are set at build time but removed at runtime, the UI shows buttons for disabled providers — users encounter auth failures.Fix: Use
NUXT_PUBLIC_AUTH_*environment variables for the runtimeConfig.public flags, or move the flag computation logic to a runtime-evaluated utility that reads directly fromenvat request time.🤖 Prompt for AI Agents