Skip to content

Avoid re-resolving 1Password secrets on Nuxt dev-server shutdown #1249

Closed

Description

@masterof0

Summary

When a Nuxt dev server using Varlock's 1Password desktop-app authentication is closed normally, the integration resolves the environment again and triggers another 1Password authentication prompt. Startup needs the first prompt; the second appears only while quitting Nuxt.

Reproduction

  • macOS, Node.js v26.10.0
  • Nuxt 4.6.1
  • @varlock/nuxt-integration 0.1.3
  • varlock 1.22.0
  • @varlock/1password-plugin 2.0.5
  • .env.schema loads the 1Password plugin and enables allowAppAuth for development; sensitive values are resolved with op().
  • nuxt.config.ts imports varlock/auto-load and registers @varlock/nuxt-integration.
  • The dev script runs varlock run -- nuxt dev.

Run the dev script, authenticate when prompted during startup, then quit with q or Ctrl+C. A second 1Password authentication prompt appears during shutdown.

Investigation

The Nuxt module's development close hook calls refreshVarlockEnv() unless the instance was already refreshed by a restart hook. That reload runs varlock load, which resolves the op() references again. The hook is also used for Nuxt CLI-driven config reloads, where the old instance closes before nuxt.config.ts is re-evaluated (as described in #985).

Could the integration distinguish a final process shutdown from a CLI-driven reload, or otherwise avoid repeating the 1Password authentication prompt on ordinary shutdown while preserving the reload behavior?

No secret values or 1Password references are included here.

Activity

  1. pullfrog commented on Oct 25, 2026

    @pullfrog
    Contributor
  2. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor

    ✅ A fix has been merged to main in #1270 and will ship in the next release. GitHub auto-closed this issue on merge, but the change isn't published yet.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions