supabase / auth

A JWT based API for managing users and issuing JWT tokens
https://supabase.com/docs/guides/auth
MIT License
1.52k stars 370 forks source link

Quick Start; Not So Quick ... #1685

Open nelsonic opened 3 months ago

nelsonic commented 3 months ago

Hi! πŸ‘‹ Running auth on localhost following the Quick Start could be enhanced. πŸ’­

docker ps
CONTAINER ID   IMAGE           COMMAND                  CREATED              STATUS              PORTS                                            NAMES
826881cc933d   auth-auth       "CompileDaemon '--bu…"   About a minute ago   Up About a minute   0.0.0.0:9100->9100/tcp, 0.0.0.0:9999->9999/tcp   auth
29d48724eed2   auth-postgres   "docker-entrypoint.s…"   3 minutes ago       Up 3 minutes       0.0.0.0:5432->5432/tcp                           auth_postgres

Visiting http://localhost:9999/health I get:

image

What next? πŸ€·β€β™‚οΈ

How many people have tried to get this running so they can contribute but fallen (silently) at the first hurdle? πŸ˜• Would you accept a PR to make it more friendly to new people?

Detailed Setup

J0 commented 3 months ago

Hey @nelsonic

Thanks for the feedback. Can I check if the connection reset issue persists when using another browser say Chrome and also if you directly use an ip address?

Would you accept a PR to make it more friendly to new people?

Feel free to tell us more about what you have in mind

nelsonic commented 3 months ago

Yeah, I just tend to use Firefox for dev, but chrome and safari both fail too.

Just thinking of adding more incremental steps to the quick start and a trouble-shooting section for people who get stuck and end up giving up.

nelsonic commented 3 months ago

More detailed output from terminal windows:

docker compose -f docker-compose-dev.yml up postgres
WARN[0000] /auth/docker-compose-dev.yml: `version` is obsolete
[+] Running 1/0
 βœ” Container auth_postgres  Created                                                                                0.0s
Attaching to auth_postgres
auth_postgres  |
auth_postgres  | PostgreSQL Database directory appears to contain a database; Skipping initialization
auth_postgres  |
auth_postgres  | 2024-07-30 05:48:01.820 UTC [1] LOG:  starting PostgreSQL 15.7 (Debian 15.7-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
auth_postgres  | 2024-07-30 05:48:01.820 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
auth_postgres  | 2024-07-30 05:48:01.820 UTC [1] LOG:  listening on IPv6 address "::", port 5432
auth_postgres  | 2024-07-30 05:48:01.822 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
auth_postgres  | 2024-07-30 05:48:01.870 UTC [27] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.002 s, sync=0.001 s, total=0.005 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB
auth_postgres  | 2024-07-30 05:48:01.877 UTC [1] LOG:  database system is ready to accept connections

Output from running make dev:

docker-compose -f docker-compose-dev.yml up
WARN[0000] /auth/docker-compose-dev.yml: `version` is obsolete
[+] Running 2/0
 βœ” Container auth_postgres  Running                  0.0s
 βœ” Container auth           Crea...                  0.0s
Attaching to auth, auth_postgres
auth           | 2024/07/30 05:48:47 Running build command!
auth           | 2024/07/30 05:48:48 Build ok.
auth           | 2024/07/30 05:48:48 Restarting the given command.
auth           | 2024/07/30 05:48:48 stderr: {"level":"fatal","msg":"Failed to load configuration: envconfig.Process: assigning GOTRUE_SMTP_PORT to Port: converting '' to type int. details: strconv.ParseInt: parsing \"\": invalid syntax","time":"2024-07-30T06:00:48Z"}

Created the .env and .env.docker files as instructed.

It's difficult for people in the "core" @supabase team, for whom everything "just works", to put themselves in the shoes of a noob that has never run the auth project. πŸ”°

J0 commented 3 months ago

Yeah that makes sense. Thanks for bringing this up. For the specific error it likely comes from here Might need to populate the SMTP config

It's difficult for people in the "core" https://github.com/supabase team, for whom everything "just works", to put themselves in the shoes of a noob that has never run the auth project. πŸ”°

This statement also makes sense - I think we're generally happy to welcome contributions. In this case perhaps an update to CONTRIBUTING.md might be a good start? Let me know what you think and if there are any places we can help with while getting set up

J0 commented 2 months ago

Hey @nelsonic,

How's it going here. Any blockers or anything we can help with?

nelsonic commented 2 months ago

Hi @J0 thanks for following-up. Currently snowed under with day-job deadlines ⏳ Don't have bandwidth for the next couple of weeks to look at this. 😞