This repository has been archived on 2025-12-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
BreadnetV3/web/src/utils/pocketbase.ts
2025-11-14 09:57:07 +13:00

14 lines
270 B
TypeScript

import PocketBase from "pocketbase";
const pb = new PocketBase("/");
export const authPB = async () => {
if (!pb.authStore.isValid) {
await pb.collection('users').authWithPassword(
import.meta.env.PB_EMAIL,
import.meta.env.PB_PW
);
}
return pb;
};