nextjs-subscription-payments icon indicating copy to clipboard operation
nextjs-subscription-payments copied to clipboard

How do you authenticate in a local development environment?

Open danielmguerrero opened this issue 2 years ago • 2 comments

I'm trying to develop my custom nextjs app from this repository, but I don't find the way to handle the authentication process in a development environment.

In my case, Twitter handle the callback redirection and I can't find the way to point localhost instead of the production site. So, when I login in local the app authenticates me in production. Supabase doesn't have any way to handle some Twitter dev credentials.

What's your approach to do this?

danielmguerrero avatar Jan 29 '23 19:01 danielmguerrero

I don't have a proper answer, but I added http://localhost:3000 under Auth > URL Config > Redirect URLs, then whenever I issue a magic link, I manually change the redirect URL to the localhost.

Would also appreciate a proper solution for local dev, but this will work in the meantime (at least for magic link auth).

thngdude avatar Mar 01 '23 03:03 thngdude

Authentication > URL Configuration >Site URL is the correct place to add http://localhost:3000/. Put it in the Site URL field and his "save". This is "the default redirect URL used when a redirect URL is not specified or doesn't match one from the allow list."

chriscarrollsmith avatar Nov 17 '23 15:11 chriscarrollsmith