Skip to content

PWPush Pro account branding dropdown never populates - missing PWPushPro field in frontend config #5057

@lacymooretx

Description

@lacymooretx

bug, integrations


Description

The PWPush Pro integration's account branding dropdown never populates, even with valid credentials. The "Test" button shows "PWPush is not enabled" despite the integration being enabled and the API key working correctly.

Root Cause

There's a mismatch between the frontend and backend:

Backend (Modules/CippExtensions/Public/PwPush/Get-PwPushAccount.ps1 line 4):

if ($Configuration.Enabled -eq $true -and $Configuration.PWPushPro -eq $true) {

Frontend (src/data/Extensions.json):

  • Has PWPush.Enabled
  • Has PWPush.UseBearerAuth
  • Missing PWPush.PWPushPro

The backend requires PWPushPro to be true to fetch accounts, but the frontend never sets this field. This appears to have been introduced in the February 2025 update (commit message: "update pwpush extension to support pro accounts and branding").

Steps to Reproduce

  1. Go to CIPP > Integrations > Password Pusher
  2. Enable Integration (toggle on)
  3. Enable "Use Bearer Authentication (Hosted only)"
  4. Enter PWPush URL: https://pwpush.com
  5. Enter a valid PWPush Pro API key
  6. Click Submit
  7. Click the refresh icon on "Select your PWPush Account for branding"
  8. Result: Dropdown shows "PWPush Pro is not enabled or configured. Make sure to save the configuration first."

Expected Behavior

The dropdown should populate with the user's PWPush accounts (fetched from /api/v1/accounts).

Verification

I confirmed my API key works correctly:

curl -s https://pwpush.com/api/v1/accounts.json \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>"

Returns valid accounts:

[
  {"id": 15863, "name": "Aspendora Technologies", ...},
  {"id": 25944, "name": "Lacy Moore", ...}
]

Suggested Fix

Option A: Add the missing field to Extensions.json:

{
  "type": "switch",
  "name": "PWPush.PWPushPro",
  "label": "PWPush Pro Account",
  "condition": {
    "field": "PWPush.UseBearerAuth",
    "compareType": "is",
    "compareValue": true
  }
}

Option B (preferred): Update the backend to use UseBearerAuth instead of PWPushPro:

if ($Configuration.Enabled -eq $true -and $Configuration.UseBearerAuth -eq $true) {

Option B seems cleaner since UseBearerAuth already indicates a hosted Pro account.

Environment

  • CIPP Hosted (not self-hosted)
  • PWPush Pro with custom domain
  • Browser: Chrome (latest)

Related Files

  • src/data/Extensions.json (frontend config)
  • Modules/CippExtensions/Public/PwPush/Get-PwPushAccount.ps1 (backend)
  • Modules/CippExtensions/Public/PwPush/Set-PwPushConfig.ps1 (backend)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions