3lvin-Kc/authbase-react: A dead simple auth state manager for React. No magic, no suprises.
github.com·5d·
Discuss: r/webdev
Alpine.js
Preview
Report Post

authbase-react : This is an early project. The goal is correctness first, adoption later.

A dead simple auth state manager for React. No magic, no suprises.

What is this?

This is just a state machine that holds your auth tokens and user data. That’s it. It doesn’t authenticate anyone, it doesn’t talk to Supabase or Firebase or whatever. It just manages the logged-in/logged-out state on the frontend.

Think of it like useState but spacifically for auth stuff.

Why does this exist?

Because every time I start a new React project, I end up writing the same auth boilerplate. Login form, logout button, protect some routes, store tokens in localStorage... you know the drill.

I got tired of copy-pasting this code around, so I made a library. Maybe you’ll find it useful…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help