Skip to content

SSO redirect does not include port number #238

@zaughon

Description

@zaughon

Whenever i open Warracker i go to http://192.168.0.110:8005 and click log in with SSO, however, the redirect_uri never includes the port number, so after logging in, i'm always redirect to a non-existing page, and need to go to the address bar and add the port number manually, to get redirected to the correct page.
redirect_uri=http%3A%2F%2F192.168.0.110%2Fapi%2Foidc%2Fcallback

I set up Warracker with the following config:

services:
  warracker:
    image: ghcr.io/sassanix/warracker/main:latest
    ports:
      - "8005:80"
    volumes:
      - ./data/warracker/uploads:/data/uploads
    env_file:
      - .env
    depends_on:
      warrackerdb:
        condition: service_healthy
    restart: unless-stopped

  warrackerdb:
    image: postgres:15-alpine
    volumes:
      - pgdata_warracker:/var/lib/postgresql/data
    env_file:
      - .env
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
      interval: 5s
      timeout: 5s
      retries: 5

volumes:
  pgdata_warracker:
### ** Database Configuration**

...

### **URL Configuration**

# Frontend URL (used for redirects and email links)
# IMPORTANT: Must match your public-facing URL for OIDC and email links to work
FRONTEND_URL=http://192.168.0.110:8005

# Application base URL (used for links in emails and redirects)
APP_BASE_URL=http://192.168.0.110:8005


### **File Upload Configuration**

...

# Enable/disable OIDC SSO functionality
OIDC_ENABLED=true
OIDC_PROVIDER_NAME=pocketid
OIDC_CLIENT_ID=something123456
OIDC_CLIENT_SECRET=something123456
OIDC_ISSUER_URL=https://auth.example.net
OIDC_SCOPE=openid email profile groups
OIDC_ADMIN_GROUP=warracker_admins

I would expect FRONTEND_URL and APP_BASE_URL to solve it and put the right URL in the redirect, but that doesn't seem to be the case.
Is this behavior intended? Did i miss something somewhere?

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