As a relatively new coder, I truly struggle with creating user registration (email validation), login, lost pwd, and tracking userID in sessions when browsers disable cookies.
It would be great if replit offered a comprehensive solution that just works, in dev and prod, that the agent is able to implement.
1 Like
We have a pretty extensive setup that comes whenever you ask the agent to add “auth”, especially on the typescript agent structure. Can you give an example of an issue you’re hitting around the way agent is doing your auth? maybe with screenshots and a link to the code?
I just want a simple way to spin up a username/password based auth system. Replit’s “auth” integration requires users have a Replit account which is fine if you’re building tools for Replit users but not for ANY other use case.
Sorry, I’m thro the woods now, and out the other side. But from what I recall:
- I didn’t use the word “auth”, I said something like “Make me a user registration with email validation, and login with password recovery. Be sure the userid is known to the app throughout the session.”
- I got the most basic login, no password recovery
- i got the most basic registration, no email validation. I spent half a day being rejected by that free SMTP service for some weird reason, finally used my own google workspace account.
- and then i spent a DAY sorting the fact that userid was lost on browsers with cookies turned off (ie ALL real users out there).
Oh sorry you’re talking about the Repl auth tool, I was confused. Please don’t use that if you’re doing auth on agent repls, it was designed pre-agent for just gating static apps not for use by agent, there’s a total rewrite of that in progress for Replit Auth in Agent-land. Just ask the agent to add auth and it’ll do an email/password based auth then add any oauth integrations you’d like after.
1 Like
Does this work for authenticating across Google accounts as well? For instance, if you want a person to be able to create an account or log in to your application using their Google account, like the one-button “Login with Google” feature, does it work for that?
Yes, the agent’s auth that it does will create a user table keyed on email, and if you ask it to add oauth it can merge those signups so it’s the same email associated with both. Might take some massaging.
1 Like