Closed bhvngt closed 1 year ago
The examples in the repo is purely for developing with this repo and not for setting up as a project. I've tested OAuth with the supabase/cli
in another repo and it works correctly https://github.com/supabase-community/supabase-by-example/tree/main/oauth-flow/sveltekit
Thanks @silentworks for your reply. I was using this repo as a reference to setup oAuth with my project. I somehow missed this particular example repo that you have shared.
I was able to make oAuth work when I tried your example locally. Thanks a ton for sharing the same.
I had missed setting up cookieOptions that is required for local server testing.
Bug report
Describe the bug
While testing oauth provider based SignIn using examples/sveltekit application, it works with hosted supabase project. However it fails to work when used with local supabase/cli setup.
So the question is, does the
gotrue
docker image used by supabase/cli supportspkce
auth flow?Or I am missing something here...
To Reproduce
Steps to reproduce the behaviour, please provide code snippets or a repository:
supabase/cli
by executing steps mentioned herehttp://localhost:54321/auth/v1/callback
<hosted_supabase_url>/auth/v1/callback
Local Development
credentialhttp://localhost:54321/auth/v1/callback
pnpm dev --filter=@example/sveltekit
Google
.env
file points tohosted supabase url
andhosted supabase anon key
state
,code
,prompt:none
http://localhost:3001/api/auth/callback?code=<code passed from previous url>
.env
file points tohttp://localhost:54321
andsupabase/cli anon key
state
,code
,prompt:consent
Expected behavior
Local
supabase/cli
development should work just like thehosted supabase environment
works for oauth loginScreenshots
System information