Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuth doesn't work with supabase start #3014

Open
AFCMS opened this issue Jan 4, 2025 · 0 comments
Open

OAuth doesn't work with supabase start #3014

AFCMS opened this issue Jan 4, 2025 · 0 comments

Comments

@AFCMS
Copy link

AFCMS commented Jan 4, 2025

Describe the bug
OAuth fails to work

To Reproduce

  • Build a small React app with the supabase client initialized with the local API URL.
  • Add auth configuration in config.yml (make sure you have the env variables setup):
[auth.external.github]
enabled = true
client_id = "env(SUPABASE_AUTH_EXTERNAL_GITHUB_ID)"
secret = "env(SUPABASE_AUTH_EXTERNAL_GITHUB_SECRET)"
redirect_uri = ""
url = ""
skip_nonce_check = false
  • Call client.auth.signInWithOAuth({provider: "github"}) somewhere in the app code.
  • Start the local supabase development stack with supabase start
  • Trigger the code path, you should see the redirection to the GitHub interface and be able to click the login button.
  • Then the page will load for some times and then get stuck on http://127.0.0.1:54321/auth/v1/callback with a 504 return code and the following response: {"code":504,"error_code":"request_timeout","msg":"Processing this request timed out, please retry after a moment.","error_id":"7fbeadf8-ab0c-4d62-afab-ad48ec54a04e"}.
  • When checking the logs in supabase studio, we can see the 504 error and also around 50s after the 504 fail we have another 500 error:
    image

Expected behavior
I want to be able to use auth with the local infrastructure.

System information

  • Version of OS: Fedora 41
  • Version of CLI: 2.2.6
  • Version of Docker: 27.4.1
  • Versions of services:
        SERVICE IMAGE      │      LOCAL       │   LINKED
  ─────────────────────────┼──────────────────┼─────────────
    supabase/postgres      │ 15.8.1.021       │ 15.8.1.021
    supabase/gotrue        │ v2.167.0         │ v2.167.0
    postgrest/postgrest    │ v12.2.3          │ v12.2.3
    supabase/realtime      │ v2.33.70         │ -
    supabase/storage-api   │ v1.14.4          │ v1.14.4
    supabase/edge-runtime  │ v1.66.2          │ -
    supabase/studio        │ 20241202-71e5240 │ -
    supabase/postgres-meta │ v0.84.2          │ -
    supabase/logflare      │ 1.4.0            │ -
    supabase/supavisor     │ 1.1.56           │ -

Additional context
If applicable, add any other context about the problem here.

  • Browser: chrome
  • Version of supabase-js: 2.47.10
  • Version of Node.js: 20.18.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant