Failed to auth with github
oxblixxx opened this issue · comments
Whenever I try to login using gitlab from the Appflowy app, it redirects to my browser but doesn't respond. I have my docker compose services running perfectly except from the admin_frontend where I have this in the logs
admin_frontend-1 | {"timestamp":"2024-08-13T02:27:06.969112Z","level":"ERROR","fields":{"error":"calling http://gotrue:9999/health failed"},"target":"gotrue::api","span":{"name":"health"},"spans":[{"name":"health"}]}
admin_frontend-1 | thread 'main' panicked at admin_frontend/src/main.rs:37:6:
admin_frontend-1 | gotrue health check failed: Unhandled(calling http://gotrue:9999/health failed
admin_frontend-1 |
admin_frontend-1 | Caused by:
admin_frontend-1 | 0: error sending request for url (http://gotrue:9999/health): error trying to connect: tcp connect error: Connection refused (os error 111)
admin_frontend-1 | 1: error trying to connect: tcp connect error: Connection refused (os error 111)
admin_frontend-1 | 2: tcp connect error: Connection refused (os error 111)
admin_frontend-1 | 3: Connection refused (os error 111)
admin_frontend-1 |
admin_frontend-1 | Stack backtrace:
admin_frontend-1 | 0: gotrue::api::Client::health::{{closure}}::{{closure}}
admin_frontend-1 | 1: admin_frontend::main::{{closure}}
admin_frontend-1 | 2: admin_frontend::main
admin_frontend-1 | 3: std::sys_common::backtrace::__rust_begin_short_backtrace
admin_frontend-1 | 4: main
admin_frontend-1 | 5: <unknown>
admin_frontend-1 | 6: __libc_start_main
admin_frontend-1 | 7: _start)
admin_frontend-1 | stack backtrace:
admin_frontend-1 | 0: rust_begin_unwind
admin_frontend-1 | 1: core::panicking::panic_fmt
admin_frontend-1 | 2: core::result::unwrap_failed
admin_frontend-1 | 3: admin_frontend::main::{{closure}}
admin_frontend-1 | 4: admin_frontend::main
admin_frontend-1 | note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Here is the logs of my gotrue service
{"component":"api","level":"warning","msg":"DEPRECATION NOTICE: GOTRUE_JWT_ADMIN_GROUP_NAME not supported by Supabase's GoTrue, will be removed soon","time":"2024-08-13T02:27:07Z"}
{"level":"info","msg":"GoTrue API started on: :9999","time":"2024-08-13T02:27:07Z"}
{"component":"api","level":"info","method":"POST","msg":"request started","path":"/signup","referer":"appflowy-flutter://","remote_addr":"172.20.0.3","time":"2024-08-13T02:27:07Z","timestamp":"2024-08-13T02:27:07Z"}
{"auth_event":{"action":"user_repeated_signup","actor_id":"4104945c-d9f4-41c6-b2ce-0f65b035fa54","actor_username":"admin@example.com","actor_via_sso":false,"log_type":"user","traits":{"provider":"email"}},"component":"api","error":"400: User already registered","level":"info","method":"POST","msg":"400: User already registered","path":"/signup","referer":"appflowy-flutter://","remote_addr":"172.20.0.3","time":"2024-08-13T02:27:07Z","timestamp":"2024-08-13T02:27:07Z"}
{"auth_event":{"action":"user_repeated_signup","actor_id":"4104945c-d9f4-41c6-b2ce-0f65b035fa54","actor_username":"admin@example.com","actor_via_sso":false,"log_type":"user","traits":{"provider":"email"}},"component":"api","duration":111663582,"level":"info","method":"POST","msg":"request completed","path":"/signup","referer":"appflowy-flutter://","remote_addr":"172.20.0.3","status":400,"time":"2024-08-13T02:27:07Z","timestamp":"2024-08-13T02:27:07Z"}
{"component":"api","level":"info","method":"GET","msg":"request started","path":"/settings","referer":"appflowy-flutter://","remote_addr":"172.20.0.8","time":"2024-08-13T02:39:22Z","timestamp":"2024-08-13T02:39:22Z"}
{"component":"api","duration":636134,"level":"info","method":"GET","msg":"request completed","path":"/settings","referer":"appflowy-flutter://","remote_addr":"172.20.0.8","status":200,"time":"2024-08-13T02:39:22Z","timestamp":"2024-08-13T02:39:22Z"}
{"component":"api","level":"info","method":"GET","msg":"request started","path":"/authorize","referer":"appflowy-flutter://","remote_addr":"172.20.0.8","time":"2024-08-13T02:39:23Z","timestamp":"2024-08-13T02:39:23Z"}
{"component":"api","level":"info","method":"GET","msg":"Redirecting to external provider","path":"/authorize","provider":"github","referer":"appflowy-flutter://","remote_addr":"172.20.0.8","time":"2024-08-13T02:39:23Z","timestamp":"2024-08-13T02:39:23Z"}
{"component":"api","duration":897477,"level":"info","method":"GET","msg":"request com pleted","path":"/authorize","referer":"appflowy-flutter://","remote_addr":"172.20.0.8","status":302,"time":"2024-08-13T02:39:23Z","timestamp":"2024-08-13T02:39:23Z"}
In my .env, I have my client id and secrets set in and this set as
GOTRUE_EXTERNAL_GITHUB_ENABLED=true
Here is workstation details
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
@oxblixxx for some reason, the gotrue
service is not able to be reached by the admin_frontend
when it starts, so it exits. Do check that those services are in the same docker network (by default they should be). if your gotrue
is running fine, admin_frontend
should also be running fine after restart(should be automatic).