Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ dates. This is a pre-1.0 project — expect breaking changes between releases.

## Unreleased

### Added

- **New package: `@thexjs/auth` (v1.1.0).** Plug-and-play authentication for x
apps: credentials (username/password) and OAuth2 — including a preconfigured
GitHub provider — behind a single `defineAuth()` call. Sessions live in SQLite
or Postgres via the framework's data layer, with Argon2id password hashing
(`Bun.password`), HMAC'd, revocable session tokens, OAuth state challenges,
and automatic CSRF on mutating endpoints. It replaces the hand-rolled auth
previously baked into `examples/basic` and `examples/saas`. See
`packages/auth/README.md` for the full reference.

### Security

- **Rate limiting is now per-client-IP.** The default limiter previously keyed
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Nothing exotic. It's a normal Bun workspaces monorepo:

```
packages/core framework runtime (router, SSR/SSG, islands, server functions, data layer)
packages/auth credentials + OAuth2/GitHub auth, sessions, CSRF
packages/cli x dev / x build / x start
packages/env type-safe env validation
packages/adapter-vercel Vercel Build Output API adapter
Expand Down
4 changes: 4 additions & 0 deletions DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ systemctl enable --now my-x-app
|-------------|---------|------------------------------------------|
| `PORT` | `3000` | HTTP port the server listens on |
| `NODE_ENV` | `production` | Set to `development` for dev mode |
| `DATABASE_URL` | — | Postgres connection string for `@thexjs/core/data` `connectPostgres`; only needed when using Postgres |
| `AUTH_SECRET` | — | Secret used to HMAC `@thexjs/auth` session/state cookies; required in production — without it sessions won't survive restarts |
| `GITHUB_CLIENT_ID` | — | OAuth app client ID for the `@thexjs/auth` GitHub provider; only needed if you use GitHub sign-in |
| `GITHUB_CLIENT_SECRET` | — | OAuth app client secret for the `@thexjs/auth` GitHub provider; only needed if you use GitHub sign-in |

## Architecture

Expand Down
Loading