Auth / foldkit-auth
What foldkit-auth owns
| Concern | Owner |
|---|---|
| Sign-in, passwords, sessions, and cookies | Yielded Auth (Auth.make, Http.make) |
| Verifying request origin and session cookie | AuthServer.resolver; per consumer via AuthServer.host |
Mapping a session to your User type | Your principal function, run per request |
| Row- and field-level authorization | foldkit-guard, given the resolved principal |
Cookie issuance, renewal, and sign-out stay in Yielded Auth's HTTP routes
(mounted directly with Http.layer(AppAuth, http) or returned by
AuthServer.host). Authorization decisions stay in
foldkit-guard, which consumes the principal this package
returns.