Next-auth in a pure react app
As in the title, I've always owned my auth and made it using axios interceptors, I wanted to try next-auth in a pure vite react app. Is it possible to use it without api routes pure client side?
3 Replies
their newest version (Auth.js - a framework agnostic solution) doesn't seem to be designed in such a way
https://authjs.dev/getting-started/introduction#secure-by-default
they say it doesn't rely on client-side js
Well so In order to use next-auth there must be a running node server
yes?
Yeah some sort of backend (I mean next has one, so maybe there's a way for Vite to have it)
It's so that theres no leaks to the client, as their Auth logic happens on the backend