Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

Invalid access key error when attempting to login to self-hosted Code Push Server #133

@enact-on

Description

@enact-on

Environment

Ubuntu VM
Node.js version: [20.11.0]
Storage Configuration: Using Azure Storage Emulator (Azurite)
Authentication Provider: GitHub OAuth

Current Status

I've successfully deployed the Code Push Server and can access the base URL which shows "Welcome to the CodePush REST API!" message. The server appears to be running correctly.

Issue

When trying to authenticate with my self-hosted Code Push Server, I'm getting an error about an invalid access key:
screenshot: https://img.enacton.com/ShareX/2025/05/putty_TFJDdZH6wj.png

Steps to Reproduce

  1. Deployed code-push-server following the installation guide
  2. Set up GitHub OAuth credentials in .env file
  3. Started Azurite for storage emulation
  4. Ran the server successfully
  5. Attempted to login using code-push-standalone login https://example.com
  6. Redirected to GitHub OAuth, authentication completes successfully
  7. Returned to the callback URL: 'https://codepush.xyz.com/auth/callback/github?code=cf010816b2f4d8e802b5&state=GvxNtJgi61VaOwrMKpOgGuhq'
  8. Copied the access key/token from the redirect URL and used it in the CLI.
  9. Encountered the "Invalid access key" error: https://img.enacton.com/ShareX/2025/05/putty_gmnZ7hvGqC.png

Expected Behavior

After completing GitHub OAuth, the server should generate a valid access key that can be used to authenticate with the CLI.

Actual Behavior

  • Any access key used results in an "Invalid access key" error
  • The authentication session appears to be lost between OAuth callback and the accesskey page

Things Already Tried

  1. Setting up Redis for session storage
  2. Manually creating tokens in Redis
  3. Enabling debug mode with DEBUG_DISABLE_AUTH=true
  4. Trying different browsers and clearing cookies
  5. Using the regular code-push CLI instead of code-push-standalone
  6. Checking Azure storage for tokens

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