Hello and thx in advance. How can I setup a dev en...
# help
f
Hello and thx in advance. How can I setup a dev enviroment to make some auth tests. When I "signIn" I 'm being redirect to my "production" deploy on vercel instead keeping on localhost. I'm trying with the next solution without success 😩
Copy code
js
async function signInWithGoogle() {
      const { user, session, error } = await supabase.auth.signIn({
        provider: 'google',
        redirectTo: window.location.origin
      })
      console.log('error', error)
      console.log('session', session)
      console.log('user', user)
    }
n
Hello @franfernandez! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
n
Hey. Completely new to supabase as well, so can't give much help. But was just looking for the same thing, and found this: https://supabase.com/docs/guides/local-development
n
franfernandez (2022-05-13)
f
Thank you @ngs 😄 !! but this seems to be a way to use and configure the DB from local. But my problem is at authentication procedure in local.
n
Ah. Fair. I was naively hoping the local db would include local auth. Any luck sorting out auth in local environment?
f
Yes, I found a solution (I think is not the best but ...) I change, while I'm developing, the principal URL in Supabase for my production URL to localhost. As I say not the best solution 😅