From fc3ac8c8b7b82406756b72a815f5128e03a4bd8a Mon Sep 17 00:00:00 2001 From: Javier R Date: Wed, 1 May 2024 20:43:52 +0200 Subject: [PATCH 1/7] fix: use `happy-headers` auth --- client.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/client.ts b/client.ts index e78dc55..6b2c4f8 100644 --- a/client.ts +++ b/client.ts @@ -1,18 +1,10 @@ import { z } from "zod"; +import getHeaders from "happy-headers"; import { type ApiFunction, type APIMap, type ApiValidators } from "~/types.ts"; export const headers = (_templates: TemplateStringsArray, token: string) => ({ - "Bereal-Platform": "android", - "Bereal-App-Language": "en-US", - "Bereal-Device-Language": "en-US", - "Bereal-App-Version": "1.19.6", - "Bereal-Os-Version": "10", - "Bereal-Device-Id": Deno.env.get("BEREAL_DEVICE_ID")!, - "Bereal-Timezone": Deno.env.get("BEREAL_TIMEZONE")!, - "Bereal-App-Version-Code": "1631", - "Bereal-Signature": Deno.env.get("BEREAL_SIGNATURE")!, - "User-Agent": "okhttp/4.12.0", "Authorization": `Bearer ${token}`, + ...getHeaders(), }); const refresh = () => ({ From 2ac8dc9de68b6610b9783077557e7f45781f3b7c Mon Sep 17 00:00:00 2001 From: Javier R Date: Wed, 1 May 2024 20:44:40 +0200 Subject: [PATCH 2/7] fix: update `fresh` --- deno.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deno.json b/deno.json index d88e422..3e20ee8 100644 --- a/deno.json +++ b/deno.json @@ -8,7 +8,7 @@ }, "lint": { "rules": { "tags": ["fresh", "recommended"] } }, "imports": { - "$fresh/": "https://deno.land/x/fresh@1.6.5/", + "$fresh/": "https://deno.land/x/fresh@1.6.8/", "preact": "https://esm.sh/preact@10.19.2", "preact/": "https://esm.sh/preact@10.19.2/", "preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.1", @@ -28,7 +28,8 @@ "~/": "./", "@twind/core": "https://esm.sh/@twind/core@1.1.3", "@twind/preset-tailwind": "https://esm.sh/@twind/preset-tailwind@1.1.4/", - "@twind/preset-autoprefix": "https://esm.sh/@twind/preset-autoprefix@1.0.7/" + "@twind/preset-autoprefix": "https://esm.sh/@twind/preset-autoprefix@1.0.7/", + "happy-headers": "npm:happy-headers" }, "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" }, "exclude": ["**/_fresh/*"], From 3a68e07588671a10cdedda40695f2dadf31b8e9e Mon Sep 17 00:00:00 2001 From: Javier R Date: Wed, 1 May 2024 20:44:52 +0200 Subject: [PATCH 3/7] fix: remove headers from `readme` --- README.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/README.md b/README.md index 0dcd2fa..797bf83 100644 --- a/README.md +++ b/README.md @@ -61,23 +61,8 @@ GITHUB_TOKEN= # Google Analytics tracking ID (Optional) GA4_MEASUREMENT_ID= - -# BeReal Signature -BEREAL_SIGNATURE= - -# BeReal Device ID -BEREAL_DEVICE_ID= - -# BeReal Timezone -BEREAL_TIMEZONE= ``` -> [!WARNING]\ -> The `BEREAL_SIGNATURE` and `BEREAL_DEVICE_ID` are required for the app to -> function. You can find them by inspecting the network requests made by the -> BeReal app in a rooted Android device using -> [Burp Suite](https://portswigger.net/burp) and [Frida](https://frida.re/). - Run the development server: ```sh From c6b1640c754c7ff6e93967e499af5075885b472e Mon Sep 17 00:00:00 2001 From: Javier R Date: Wed, 1 May 2024 20:48:06 +0200 Subject: [PATCH 4/7] fix: changelog `width` --- islands/Changelog.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/islands/Changelog.tsx b/islands/Changelog.tsx index 39a3830..edd638f 100644 --- a/islands/Changelog.tsx +++ b/islands/Changelog.tsx @@ -19,8 +19,8 @@ export default function Changelog() { }, []); return ( - <> -
+
+

Changelog

@@ -64,6 +64,6 @@ export default function Changelog() {
)} - +
); } From 549cd408b42602bab65f7e969d9f10963a8f4476 Mon Sep 17 00:00:00 2001 From: Javier R Date: Wed, 1 May 2024 20:48:14 +0200 Subject: [PATCH 5/7] fix: remove `search` icon --- islands/Navbar.tsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/islands/Navbar.tsx b/islands/Navbar.tsx index eeeaa54..2c111cf 100644 --- a/islands/Navbar.tsx +++ b/islands/Navbar.tsx @@ -7,7 +7,6 @@ import IconReload from "icons/reload.tsx"; import IconArrowBigLeft from "icons/arrow-big-left.tsx"; import IconUser from "icons/user.tsx"; import IconChartBar from "icons/chart-bar.tsx"; -import IconSearch from "icons/search.tsx"; import { isLoggedIn, logout, store } from "~/state/auth.ts"; export default function Navbar() { @@ -53,11 +52,6 @@ export default function Navbar() { )} - {isLogged && ( - - - - )} {isDarkMode ? : } From 39ef60ecd5f0f9076d872b8c60406b34f737e4ce Mon Sep 17 00:00:00 2001 From: Javier R Date: Wed, 1 May 2024 20:48:24 +0200 Subject: [PATCH 6/7] fix: update`google` api keys --- routes/api/send.ts | 4 ++-- routes/api/verify.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/routes/api/send.ts b/routes/api/send.ts index 9315a57..0314203 100644 --- a/routes/api/send.ts +++ b/routes/api/send.ts @@ -63,7 +63,7 @@ export const handler = async ( } const receiptResponse = await fetch( - "https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyClient?key=AIzaSyDwjfEeparokD7sXPVQli9NsTuhT6fJ6iA", + "https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyClient?key=AIzaSyCgNTZt6gzPMh-2voYXOvrt_UR_gpGl83Q", { method: "POST", headers: { @@ -103,7 +103,7 @@ export const handler = async ( }; const otpResponse = await fetch( - "https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?key=AIzaSyDwjfEeparokD7sXPVQli9NsTuhT6fJ6iA", + "https://www.googleapis.com/identitytoolkit/v3/relyingparty/sendVerificationCode?key=AIzaSyCgNTZt6gzPMh-2voYXOvrt_UR_gpGl83Q", { method: "POST", headers: { diff --git a/routes/api/verify.ts b/routes/api/verify.ts index dd75001..be6e37e 100644 --- a/routes/api/verify.ts +++ b/routes/api/verify.ts @@ -63,7 +63,7 @@ export const handler = async ( }; const googleResponse = await fetch( - "https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyCustomToken?key=AIzaSyDwjfEeparokD7sXPVQli9NsTuhT6fJ6iA", + "https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyCustomToken?key=AIzaSyCgNTZt6gzPMh-2voYXOvrt_UR_gpGl83Q", { method: "POST", body: JSON.stringify({ @@ -113,7 +113,7 @@ export const handler = async ( } const fireResponse = await fetch( - "https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPhoneNumber?key=AIzaSyDwjfEeparokD7sXPVQli9NsTuhT6fJ6iA", + "https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPhoneNumber?key=AIzaSyCgNTZt6gzPMh-2voYXOvrt_UR_gpGl83Q", { method: "POST", headers: { @@ -165,7 +165,7 @@ export const handler = async ( } const tokenResponse = await fetch( - "https://securetoken.googleapis.com/v1/token?key=AIzaSyDwjfEeparokD7sXPVQli9NsTuhT6fJ6iA", + "https://securetoken.googleapis.com/v1/token?key=AIzaSyCgNTZt6gzPMh-2voYXOvrt_UR_gpGl83Q", { method: "POST", headers: { From 9850dbb02df123a3b7d35a5e7e740281fe5ee1bb Mon Sep 17 00:00:00 2001 From: Javier R Date: Wed, 1 May 2024 20:52:33 +0200 Subject: [PATCH 7/7] fix: remove `red` background --- islands/Changelog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/islands/Changelog.tsx b/islands/Changelog.tsx index edd638f..f53a144 100644 --- a/islands/Changelog.tsx +++ b/islands/Changelog.tsx @@ -20,7 +20,7 @@ export default function Changelog() { return (
-
+

Changelog