("login");
@@ -1014,22 +1002,7 @@ function AuthView({
-
-
- or
-
-
-
-
-
-
diff --git a/src/lib/appwrite.ts b/src/lib/appwrite.ts
index f2e0a14..60afb8b 100644
--- a/src/lib/appwrite.ts
+++ b/src/lib/appwrite.ts
@@ -1,17 +1,16 @@
-import { Account, Channel, Client, ID, OAuthProvider, Permission, Query, Role, TablesDB } from "appwrite";
+import { Account, Channel, Client, ID, Permission, Query, Role, TablesDB } from "appwrite";
const env = import.meta.env;
const currentOrigin = window.location.origin;
export const appwriteConfig = {
endpoint: env.VITE_APPWRITE_ENDPOINT || "https://fra.cloud.appwrite.io/v1",
- projectId: env.VITE_APPWRITE_PROJECT_ID || "6a0752ee001fb2ef7138",
+ projectId: env.VITE_APPWRITE_PROJECT_ID,
databaseId: env.VITE_APPWRITE_DATABASE_ID || "redbull_tracker",
collectionId: env.VITE_APPWRITE_COLLECTION_ID || "intake_entries",
chatCollectionId: env.VITE_APPWRITE_CHAT_COLLECTION_ID || "coach_chats",
barcodeCollectionId: env.VITE_APPWRITE_BARCODE_COLLECTION_ID || "barcode_products",
- oauthSuccessUrl: resolveOAuthUrl(env.VITE_APPWRITE_OAUTH_SUCCESS_URL),
- oauthFailureUrl: resolveOAuthUrl(env.VITE_APPWRITE_OAUTH_FAILURE_URL),
+
};
const client = new Client()
@@ -25,18 +24,6 @@ export async function pingAppwrite() {
return client.ping();
}
-export { account, Channel, client, ID, OAuthProvider, Permission, Query, Role, tablesDB };
+export { account, Channel, client, ID, Permission, Query, Role, tablesDB };
-function resolveOAuthUrl(value?: string) {
- if (!value) return currentOrigin;
- const configured = new URL(value, currentOrigin);
- const current = new URL(currentOrigin);
- const localHosts = new Set(["localhost", "127.0.0.1", "::1"]);
-
- if (env.DEV && localHosts.has(configured.hostname) && localHosts.has(current.hostname)) {
- return currentOrigin;
- }
-
- return configured.toString().replace(/\/$/, "");
-}