feat: add auth to tui

This commit is contained in:
Max Koon
2025-11-17 10:08:10 -05:00
parent 114eaf88eb
commit 9e11455db1
17 changed files with 388 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
import { betterAuth } from "better-auth";
import { drizzleAdapter } from "better-auth/adapters/drizzle";
import { genericOAuth } from "better-auth/plugins";
import { bearer, deviceAuthorization, genericOAuth } from "better-auth/plugins";
import { expo } from "@better-auth/expo";
import { drizzleSchema } from "@money/shared/db";
import { db } from "./db";
@@ -37,6 +37,8 @@ export const auth = betterAuth({
scopes: ["profile", "email"],
}
]
})
}),
deviceAuthorization(),
bearer(),
]
});

View File

@@ -99,6 +99,8 @@ const createMutators = (authData: AuthData | null) => {
id: randomUUID(),
userId: authData.user.id,
token: data.access_token,
logoUrl: "",
name: ""
});
},