// the find
smpallen99/coherence
Coherence is a full featured, configurable authentication system for Phoenix
Coherence is a Phoenix authentication library that generates boilerplate code into your project via mix tasks — controllers, views, templates, migrations, all namespaced and yours to edit. It covers the standard auth feature set: registration, confirmation, password reset, lockout, remember-me, invitations, and trackable login stats. It's aimed at Phoenix apps that want a starting point they can own, not a black-box dependency.
The code-generation approach is genuinely smart — you run `mix coh.install` and get editable source files instead of being locked into the library's opinions forever. The remember-me implementation uses a series/token pair with hashing, which is the correct way to do persistent sessions and protects against cookie theft. Pluggable password hashing (bcrypt, argon2, pbkdf2) with explicit guidance to drop the work factor in test environments is a detail a lot of auth libs skip. Channel authentication via Phoenix.Token is included, which saves real work if you're adding websocket features.
The project is essentially unmaintained — last meaningful activity was years ago, and the Phoenix ecosystem has moved on to LiveView and Phoenix 1.7+ with verified routes, neither of which Coherence accounts for. The installer generates `.eex` templates against the old Phoenix HTML helpers API, so you'll hit deprecation warnings immediately and need to rewrite templates anyway. The credential store is an in-memory GenServer, which means every node in a cluster has its own session state — a silent distributed correctness bug that will surprise you the first time you deploy more than one instance. `pow` has largely replaced Coherence in the ecosystem and is actively maintained.