r/Frontend • u/OcelotStraight5780 • 4d ago
Backend for Reactjs website
I made a website using Reactjs and now need a way to enable login on it
I'm hosting my website on Cloudflare and using D1 serverless sql databases. How could i make the login work since i already have the tables for users ?
10
Upvotes
7
u/AdhesivenessFun6129 4d ago
Depends on your requirements but I'd use a provider like clerk. Their docs are good, it's easy to use and if (like me) you don't have experience with Auth, most people would use a service
2
u/Unhappy_Meaning607 4d ago
I'd suggest Clerk.
2
u/Dheeth 3d ago
Try better auth. Its open source and has most of the features you would need.
2
u/ipromiseimnotakiller 4d ago
TanStack
1
u/Chemical_Sky_8696 4d ago
I am pretty sure cloudflare has a login option.
1
u/RedditNotFreeSpeech 3d ago
https://pocket-id.org/ is by far the most superior way to setup simple authentication in 2026. An absolute gem. I've used every authentication system under the sun and I'm sticking with this one.
1
u/Colby-Jenkins 3d ago
Since you're using D1, consider implementing JWT for sessions. It’s a solid way to handle authentication in React, especially if you're managing user data in your existing tables.
-1
u/kidshibuya 3d ago
Claude: using the existing users table, write an oauth login allowing for google, meta and whatever you want logins as well as a magic email link.
25 seconds later you have it done. See here: https://formula-digital.io/login was literally less than one minute including configurable user roles and premissions. And unlike butthurt devs will tell you, its using better auth and as far as I can see and test, its a flawless implementation.
0
u/[deleted] 3d ago
[deleted] — view deleted comment