V0, Supabase, and login pages. WTH?

AI helpbot wasn’t helpful, so I’m looking for some Human help. I am trying to enable a simple login function for my app. There are two user types: Photographers and Clients. v0 is using the Supabase auth system to create this function.

Over probably 20 iterations of this I have yet to successfully log into the deployed version of my app. I’ve gotten a few “non iteritable” errors, a few loops, and some redirects that just have the login page persist. The last few times I’ve gotten “Not Authed” pages that redirect me to the login page.

When in the Preview I can achieve login, including when it brings me to the localhost version of the app. The most success I’ve had is the “Magic Link” type of auth.

The expected behavior is obviously to allow a user to access the app. Is there a specific thing that a novice dev would be missing here?

Did you know about these other v0 resources? A human should be here soon to help, but the answer may already be available even faster in one of these other posts.

This guide is a great place to start.

And these recordings can give you a look at v0 features and strategies in action: Topics tagged v0

The magic link method forwards me to a localhost:3000 page in my browser and contains no admin function, which leads me to believe it’s not actually doing the thing I want it to. This shouldn’t be this hard right? There has to be thousands of people with apps built using v0 that use some sort of Auth.

I have also tried this prompt in the chat which did not provide the requested output:

Build an app that contains a login page where users can sign up. When they have signed up, allow them to log in and then display a landing page that says “You’ve successfully logged in”

It literally failed and building an app that’s sole purpose is successful logging in. It’s got to be me. I have to be missing something totally obvious at this point.

Hi @mleydet1, welcome to the Vercel Community!

Sorry that it’s not going the way you thought. I will try to shed some light here:

Yes, many people have built apps using v0 that include authentication. But, AI systems are highly dynamic to prompts so v0 may generate code that doesn’t work as precisely.

About the localhost:3000 it maybe do with the examples that v0 referenced to but in such cases you need to prompt it back saying that you don’t need a localhost URL, instead use the hosted URL.

Iteration is the key here: you need to take one step at a time, ask v0 to do one single big task at a moment, see the output, give prompts to improve it and repeat the process.

There’s nothing inherently wrong with your approach. You just need to give precise and detailed instructions and one big thing at a time.

I hope this was helpful.

1 Like