Is it just me or do the docs seems incorrect. Belo...
# help
s
Is it just me or do the docs seems incorrect. Below is taken straight from the docs, but the console.log does not do anything.
Copy code
js
    const { user, session, error } = await supabase.auth.signIn({
      // provider can be 'github', 'google', 'gitlab', or 'bitbucket'
      provider: "github",
    });

    console.log(user);
s
Yes the docs are incorrect as when using social auth you don't get a user returned, user is always null. You can see the code here https://github.com/supabase/gotrue-js/blob/5d2f65a3d8b565b47e277211e6a4c8054c0b8e97/src/GoTrueClient.ts#L536-L559
s
Ah super helpful, thanks @User . Any idea how I would route the user to a new page after a succesful github login? Using the redirect option isn't too helpful because it adds the token and everything to the end of the url
s
I'm using redirectTo without the token and everything at the end of the url because the Supabase library strips those out for me (unless it's SvelteKit doing this and I'm unaware of it)
s
So something like this?
Copy code
js
      const { user, session, error } = await supabase.auth.signIn(
        {
          provider: "github",
        },
        {
          redirectTo: "https://localhost:3000/dashboard",
        }
      );
For me, this adds the token and everything
s
I'll try and setup a project over the weekend using this and see what the results are.
s
thank you