Skip to content

shopify-app-express silently reads env vars (SHOPIFY_API_KEY, SHOPIFY_API_SECRET, HOST) but this is not documented #3110

@sergiocasao

Description

@sergiocasao

Overview/summary

@shopify/shopify-app-express automatically reads the following environment variables when they are not explicitly passed to shopifyApp():

  • SHOPIFY_API_KEY
  • SHOPIFY_API_SECRET
  • HOST (split into hostScheme and hostName)
  • SCOPES

This behavior is implemented in apiConfigWithDefaults() in the source, but is not mentioned anywhere in the README or docs.

Why it matters

Developers using the library may:

  • Not know why their app works (or breaks) depending on which env vars are set
  • Be confused when configuration seems to appear "for free" with no explicit setup
  • Struggle to debug auth issues without knowing these implicit defaults exist

Suggested fix

Add a section to the README documenting the supported environment variables, for example:

Environment Variables

The following environment variables are automatically read if not explicitly provided in the config:

Variable Maps to config field Description
SHOPIFY_API_KEY apiKey Your app's API key
SHOPIFY_API_SECRET apiSecretKey Your app's API secret
HOST hostName / hostScheme Your app's public URL
SCOPES scopes Comma-separated list of OAuth scopes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions