2 Commits

Author SHA1 Message Date
Lane Campbell
053e1bf10f feat: email plugin improvements and OTP login plugin
Email Plugin Enhancements:
- Load and display saved settings from database
- Pre-populate form fields with existing values
- Implement functional test email feature using Resend API
- Add proper error handling and success messages
- Save settings to database with POST endpoint

OTP Login Plugin (New):
- Add one-time password login functionality
- Email-based OTP authentication
- Database migration for OTP codes table
- Email templates for OTP delivery
- Comprehensive unit tests

Build Improvements:
- Enhanced tsup config with tree-shaking
- Remove bare zod imports from built files
- Better module bundling optimization

Assets:
- Add SonicJS logo, favicon, and Discord images

馃 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 13:45:36 -08:00
Lane Campbell
f4d25616d8 Add core auth enhancements for plugin extensibility
Enable plugins to implement alternative authentication methods:

- Add AuthManager.setAuthCookie() helper for setting auth cookies
- Export AuthService interface in plugin types
- Add comprehensive auth methods to PluginContext.services.auth:
  * generateToken() - Create JWT tokens
  * verifyToken() - Validate JWT tokens
  * setAuthCookie() - Set authentication cookies
  * hashPassword() - Hash passwords
  * verifyPassword() - Verify passwords
- Import setCookie from hono/cookie in auth middleware
- Rebuild dist files with updated middleware and types

These minimal, non-breaking changes enable plugins like magic-link-auth,
OAuth providers, and other alternative authentication methods to be
implemented without modifying core code.

馃 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 14:42:57 -08:00