feat: add zero
This commit is contained in:
@@ -4,7 +4,7 @@ import { expoClient } from "@better-auth/expo/client";
|
||||
import * as SecureStore from "expo-secure-store";
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: "http://localhost:8081",
|
||||
baseURL: "http://localhost:3000",
|
||||
plugins: [
|
||||
expoClient({
|
||||
scheme: "money",
|
||||
|
||||
24
lib/auth.ts
24
lib/auth.ts
@@ -1,24 +0,0 @@
|
||||
import { betterAuth } from "better-auth";
|
||||
import { genericOAuth } from "better-auth/plugins";
|
||||
import { expo } from "@better-auth/expo";
|
||||
import { Pool } from "pg";
|
||||
|
||||
export const auth = betterAuth({
|
||||
database: new Pool({
|
||||
connectionString: process.env.DATABASE_URL,
|
||||
}),
|
||||
plugins: [
|
||||
expo(),
|
||||
genericOAuth({
|
||||
config: [
|
||||
{
|
||||
providerId: 'koon-family',
|
||||
clientId: process.env.OAUTH_CLIENT_ID!,
|
||||
clientSecret: process.env.OAUTH_CLIENT_SECRET!,
|
||||
discoveryUrl: process.env.OAUTH_DISCOVERY_URL!,
|
||||
scopes: ["profile", "email"],
|
||||
}
|
||||
]
|
||||
})
|
||||
]
|
||||
});
|
||||
8
lib/zero.ts
Normal file
8
lib/zero.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import {Zero} from '@rocicorp/zero';
|
||||
import { schema } from "@money/shared";
|
||||
|
||||
export const zero = new Zero({
|
||||
userID: 'anon',
|
||||
server: 'http://localhost:4848',
|
||||
schema,
|
||||
});
|
||||
Reference in New Issue
Block a user