lucia icon indicating copy to clipboard operation
lucia copied to clipboard

provide tutorial and examples for plain react (react-router)

Open yogeshdofficial opened this issue 1 year ago • 4 comments

examples and tutorial of google/github auth exists for sveltekit,next,astro but it would be very useful if it was also available for plain react spa

yogeshdofficial avatar Oct 30 '24 12:10 yogeshdofficial

You still need server for storing session into db. Doesn't it make sense to use a framework that helps with server stuff?

zeronumbers avatar Nov 04 '24 16:11 zeronumbers

You still need server for storing session into db. Doesn't it make sense to use a framework that helps with server stuff?

like what?? using express with any db is very simple so I don't think frameworks are not a must simple projects

yogeshdofficial avatar Nov 09 '24 19:11 yogeshdofficial

You still need server for storing session into db. Doesn't it make sense to use a framework that helps with server stuff?

like what?? using express with any db is very simple so I don't think frameworks are not a must simple projects

Now you have a problem of choosing backend. Nextjs helps with server components, idk how to use those in normal react with some backend like express, there are also server actions, completely replaceable but it is easier to write. However nextjs has a number of problems like opt out telemetry, or inability to use nodejs at middleware, using pre release react etc.

zeronumbers avatar Nov 11 '24 12:11 zeronumbers

I think the author meant to ask how to handle 302 redirects on the client-side using react-router using an SPA pattern. Most use Axios, and it doesn't redirect the route upon 302s.

That's difficult to crack, and needs more research, since it's outside the realm of Lucia, which is solely server-side focussed.

binarykitchen avatar May 31 '25 02:05 binarykitchen