feat(frontend): Send JWT with every request

This commit is contained in:
2025-04-20 18:34:56 +02:00
parent eec15dd7ef
commit 28954f7c2e
3 changed files with 13 additions and 6 deletions

View File

@@ -1,12 +1,13 @@
import { betterAuth } from 'better-auth'
import Database from 'better-sqlite3'
import { organization } from 'better-auth/plugins'
import { organization, jwt } from 'better-auth/plugins'
import { resend } from './mail'
export const auth = betterAuth({
database: new Database('./sqlite.db'),
emailAndPassword: { enabled: true, autoSignIn: false },
plugins: [
jwt(),
organization({
async sendInvitationEmail(data) {
console.log('Sending invitation email', data)