Skip to content

[🐛 Bug]: incorrect username in UI oauth2proxy #5482

@dudename

Description

@dudename

Describe the bug
When using AUTH_TYPE=OAUTH2PROXY, the UI displays the default user "Keep" and highlights "Keep" in the tab settings?selectedTab=users&userSubTab=users, instead of showing the actual logged-in user from OAuth2Proxy.

The /api/auth/session endpoint returns a response for AuthType.NOAUTH (as defined in keep-ui/auth.config.ts):

{
  "user": {
    "name": "Keep",
    "email": "keep",
    "accessToken": "{\"tenant_id\":\"keep\",\"user_id\":\"keep-user-for-no-auth-purposes\"}",
    "tenantId": "keep",
    "role": "user",
    "tenantIds": [
      {
        "tenant_id": "keep",
        "tenant_name": "Tenant of Keep (tenant_id: keep)"
      },
      {
        "tenant_id": "keep2",
        "tenant_name": "Tenant of another Keep (tenant_id: keep2)"
      }
    ]
  },
  "expires": "2026-01-10T09:01:19.626Z",
  "accessToken": "{\"tenant_id\":\"keep\",\"user_id\":\"keep-user-for-no-auth-purposes\"}",
  "tenantId": "keep",
  "userRole": "user"
}

To Reproduce
Steps to reproduce the behavior:

  1. Set up KeepHQ works with oauth2proxy
  2. Configure environment variables: KEEP_OAUTH2_PROXY*
  3. Sign in to KeepHQ via OAuth2Proxy
  4. Check the current user in the UI’s main tab and in settings?selectedTab=users&userSubTab=users

Expected behavior
The UI should display the actual logged-in user from OAuth2Proxy — the one created in the database by the backend.

Screenshots

Image

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingUIUser interface related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions