Using better-auth without a database

Hey, just a quick question, Can I use better-auth to do this: - oauth providers - auth with jwt sessions - refresh token rotation - no database
4 Replies
Soheel
Soheel3d ago
Where do you intend on storing the Data that is needed for Authentification then ? You definitely need some kind of data storage even to enable OAuth for a user or anything related to Authentification e.g. storing shared secrets, etc.
ooi cat
ooi catOP3d ago
I thought I could do that all with just cookies also, nice pfp mate
ooi cat
ooi catOP3d ago
if I were to use database sessions, I would probs add redis to offload the sessions to it instead of db https://www.better-auth.com/docs/concepts/database#secondary-storage
Database | Better Auth
Learn how to use a database with Better Auth.
ooi cat
ooi catOP3d ago
found my answer I guess: https://discord.com/channels/1288403910284935179/1349320159093067897/1351234067701436468 maybe I'll just go vanilla, iron-session, or jose ended up doing some oauth2 + iron session + cookies thingy, seems to work good now need to see where I'll do refresh token rotation, but should be doable

Did you find this page helpful?