Skip to content

[BUG] [PostgreSQL] Unable to login #136

@ancashoria

Description

@ancashoria

Describe the bug
I have setup Cap (2.0.17) to use PostgreSQL according to the instructions. When I try to login with the correct admin key I get: integer out of range. Please note that if I try a wrong password I get 401 {success: false}.

Here's the CURL request the browser made:

curl 'https://my-cap.example.com/auth/login' \
  -X POST \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0' \
  -H 'Accept: */*' \
  -H 'Accept-Language: en-US,en;q=0.7,ro;q=0.3' \
  -H 'Accept-Encoding: gzip, deflate, br, zstd' \
  -H 'Referer: https://my-cap.example.com/' \
  -H 'Content-Type: application/json' \
  -H 'Origin: https://my-cap.example.com' \
  -H 'DNT: 1' \
  -H 'Sec-GPC: 1' \
  -H 'Alt-Used: my-cap.example.com' \
  -H 'Connection: keep-alive' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'Priority: u=0' \
  -H 'TE: trailers' \
  --data-raw '{"admin_key":"MY_CORRECT_KEY_THAT_I_CHECKED"}'

Affects:

  • Standalone mode
  • [] Widget
  • [] Server
  • [] WASM
  • [] Solver
  • [] Solver CLI

To Reproduce
Steps to reproduce the behavior:

  1. Open selfhosted cap url
  2. Try to login with the correct admin key
    Expected behavior
    I expect to be able to login.

Additional context
I am sure that I setup the DB_URL correctly because Cap has written something inside the db and it's size has increased.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions