Files
ZacharyZhang-NYandClaude Opus 4.6 27a8f0667c Complete Better Auth migration, harden security, update all docs
Console:
- Rewrite auth from JWT decoding to Better Auth useSession()
- Add auth-client.ts with createAuthClient
- Remove elydora_token localStorage, dead auth API functions
- Fix login/register pages to use signIn.email/signUp.email

Server:
- Upgrade better-auth ^1.2.0 → ^1.5.5
- CORS: enforce allowlist on all environments
- Sync auth service and middleware with backend

SDKs:
- Deprecate login/register in Node, Python, Go SDKs
- Update READMEs to show direct token initialization

Config:
- Sanitize .env with dev-only placeholder values
- Update helm chart and install scripts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 00:48:57 -04:00

26 lines
739 B
Bash
Executable File

#!/bin/sh
# Generates an Ed25519 signing key and a random Better Auth secret for initial setup.
# Requires: openssl
set -e
echo "=== Elydora Key Generation ==="
echo ""
# Generate Ed25519 private key and export as base64url
SIGNING_KEY=$(openssl genpkey -algorithm ed25519 2>/dev/null \
| openssl pkcs8 -topk8 -nocrypt -outform DER 2>/dev/null \
| tail -c 32 \
| base64 \
| tr '+/' '-_' \
| tr -d '=\n')
# Generate 32-byte random Better Auth secret as hex
BETTER_AUTH_SECRET=$(openssl rand -hex 32)
echo "Add these to your .env file:"
echo ""
echo "ELYDORA_SIGNING_KEY=${SIGNING_KEY}"
echo "BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET}"
echo ""
echo "WARNING: Store these values securely. Do not commit them to version control."