From 50c29e45958a56beb638b8f74f137961c7651f69 Mon Sep 17 00:00:00 2001 From: feco Date: Fri, 27 Nov 2026 06:37:06 +0000 Subject: [PATCH] Login inside Facebook's browser, a home page that shows at once, visitor statistics in the privacy notice - Login page: in Facebook's, Messenger's, Instagram's and other apps' built-in browsers Google refuses to sign in, so the page says so, puts the e-mail form first, hides the Google button and offers the way out (Chrome on Android, the app's menu on an iPhone, copying the link). - Home page: the heading, text and buttons no longer fade in over 1.5 s. - Privacy notice (HU/EN): Cloudflare Web Analytics, cookieless, totals only. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL --- services/frontend/src/app/Landing.tsx | 14 ++-- .../frontend/src/app/adatvedelem/page.tsx | 19 ++++- .../frontend/src/app/belepes/InAppNotice.tsx | 57 +++++++++++++ services/frontend/src/app/belepes/page.tsx | 82 +++++++++++++------ services/frontend/src/app/globals.css | 13 ++- services/frontend/src/app/privacy/page.tsx | 14 +++- services/frontend/src/lib/inAppBrowser.ts | 35 ++++++++ services/frontend/src/lib/legal.ts | 4 +- 8 files changed, 198 insertions(+), 40 deletions(-) create mode 100644 services/frontend/src/app/belepes/InAppNotice.tsx create mode 100644 services/frontend/src/lib/inAppBrowser.ts diff --git a/services/frontend/src/app/Landing.tsx b/services/frontend/src/app/Landing.tsx index 87349ac..39e02a1 100644 --- a/services/frontend/src/app/Landing.tsx +++ b/services/frontend/src/app/Landing.tsx @@ -61,17 +61,17 @@ export function Landing({ inviteOnly, loggedIn = false }: { inviteOnly: boolean;
- Születési képlet · Éves előrejelzés · Kapcsolat -

+ Születési képlet · Éves előrejelzés · Kapcsolat +

Ahol a csillagok
összekötnek.

-

+

Add meg, mikor és hol születtél: percre pontosan kiszámoljuk a képletedet, és személyre szóló elemzést írunk belőle. Megmutatjuk, mit hoz az éved, és mennyire illetek össze azzal, akit szeretsz.

-
+
-
+
{signIn} @@ -97,13 +97,13 @@ export function Landing({ inviteOnly, loggedIn = false }: { inviteOnly: boolean;
{!loggedIn && ( -

+

Ingyenes Nézd meg a születési horoszkópodat belépés nélkül →

)} {!loggedIn && ( -

+

{inviteOnly ? "Az oldal egyelőre meghívásos: meghívóval, Google-fiókkal lépsz be." : "A képlet és a rövid összefoglaló ingyenes. Google-fiókkal lépsz be."} diff --git a/services/frontend/src/app/adatvedelem/page.tsx b/services/frontend/src/app/adatvedelem/page.tsx index 9865aa7..529aa71 100644 --- a/services/frontend/src/app/adatvedelem/page.tsx +++ b/services/frontend/src/app/adatvedelem/page.tsx @@ -207,6 +207,14 @@ export default async function PrivacyPage() { Biztonság, hibakeresés, visszaélések kiszűrése Jogos érdek (6. cikk (1) f) + + + Melyik oldalt nyitottad meg, honnan érkeztél, a böngésződ és az eszközöd típusa, az országod és az oldal + betöltési ideje (látogatottságmérés) + + Hogy lássuk, mennyien nézik az egyes oldalakat, és elég gyors-e az oldal + Jogos érdek (6. cikk (1) f) +

@@ -337,7 +345,8 @@ export default async function PrivacyPage() { Cloudflare, Inc. – a forgalom továbbítása és a támadások elleni védelem; az oldal letöltésekor kezeli az IP-címedet és a kérés adatait. Az e-mailes regisztrációnál és a jelszókérésnél a Turnstile szolgáltatásával ellenőrzi, hogy nem gép küldi az űrlapot (ehhez a böngésző jellemzőit is - vizsgálja). + vizsgálja). A Web Analytics szolgáltatásával méri a látogatottságot és az oldal sebességét, süti és a + böngészőben tárolt azonosító nélkül; az egyes látogatókat nem követi.
  • Google LLC – bejelentkezés Google-fiókkal. @@ -406,7 +415,13 @@ export default async function PrivacyPage() {

    A működéshez feltétlenül szükséges sütit használunk (sf_session), amely belépve tart. Ha a fórumon világos vagy sötét témát választasz, a választásodat egy második süti (sf_forum_theme) - őrzi egy évig; mást nem tárol. Reklám- vagy követő sütiket, illetve látogatottságmérőt nem használunk. + őrzi egy évig; mást nem tárol. Reklám- vagy követő sütiket nem használunk. +

    +

    + A látogatottságot a Cloudflare Web Analytics méri, süti és a böngészőben tárolt azonosító nélkül. Az oldal + betöltésekor egy kis szkript elküldi, melyik oldalt nyitottad meg, honnan érkeztél, milyen böngészőt és + eszközt használsz, és mennyi idő alatt töltődött be az oldal. Mi ebből csak összesített számokat látunk, az + egyes látogatókat nem tudjuk követni.

    A belépés nélküli születési horoszkópnál a megadott születési adatokat diff --git a/services/frontend/src/app/belepes/InAppNotice.tsx b/services/frontend/src/app/belepes/InAppNotice.tsx new file mode 100644 index 0000000..8968da9 --- /dev/null +++ b/services/frontend/src/app/belepes/InAppNotice.tsx @@ -0,0 +1,57 @@ +"use client"; + +import { useState } from "react"; + +import { copyDialog } from "@/components/Dialogs"; +import { chromeIntent, type InAppBrowser } from "@/lib/inAppBrowser"; + +/** "a Facebook", "az Instagram": the Hungarian article, capitalised at the start of a sentence. */ +function named(app: string | null): string { + if (!app) return "Egy alkalmazás"; + return `${/^[aáeéiíoóöőuúüű]/i.test(app) ? "Az" : "A"} ${app}`; +} + +/** + * On the login page inside an app's built-in browser (Facebook and co.): + * why the Google button is missing, and the way out to the phone's own + * browser. On Android a link opens the page in Chrome; on an iPhone only the + * app's own menu can, so the text says where, and the link can be copied. + */ +export function InAppNotice({ browser, url, password }: { browser: InAppBrowser; url: string; password: boolean }) { + const [copied, setCopied] = useState(false); + const where = browser.android ? "a Chrome-ban" : "a böngésződben (Safari)"; + + async function copy() { + try { + await navigator.clipboard.writeText(url); + setCopied(true); + } catch { + await copyDialog({ + title: "A belépési oldal linkje", + text: "Másold ki, és nyisd meg a böngésződben.", + value: url, + }); + } + } + + return ( +

    + {named(browser.app)} beépített böngészőjében vagy +

    + Itt a Google nem engedi a Google-fiókos belépést. {password ? "Lépj be e-mail-címmel, vagy nyisd" : "Nyisd"} meg + az oldalt {where}, ott a Google-fiókoddal is beléphetsz. + {!browser.android && " Ehhez koppints a jobb felső sarokban a ⋯ gombra, és válaszd a megnyitást böngészőben."} +

    +
    + {browser.android && ( + + Megnyitás Chrome-ban + + )} + +
    +
    + ); +} diff --git a/services/frontend/src/app/belepes/page.tsx b/services/frontend/src/app/belepes/page.tsx index 4241f52..334d0ee 100644 --- a/services/frontend/src/app/belepes/page.tsx +++ b/services/frontend/src/app/belepes/page.tsx @@ -1,4 +1,5 @@ import type { Metadata } from "next"; +import { headers } from "next/headers"; import Link from "next/link"; import { redirect } from "next/navigation"; @@ -6,11 +7,14 @@ import { Logo } from "@/components/SiteHeader"; import { ZodiacWheel } from "@/components/ZodiacWheel"; import { BACKEND_URL, getMe } from "@/lib/server"; import { formatDate } from "@/lib/astro"; +import { inAppBrowser } from "@/lib/inAppBrowser"; import { contents } from "@/lib/packageContents"; +import { siteUrl } from "@/lib/share"; import type { InvitationLanding, PublicConfig } from "@/lib/types"; import { AppleLogin } from "./AppleLogin"; import { GoogleLogin } from "./GoogleLogin"; +import { InAppNotice } from "./InAppNotice"; import { PasswordLogin } from "./PasswordLogin"; export const metadata: Metadata = { title: "Belépés" }; @@ -123,6 +127,46 @@ export default async function LoginPage({ searchParams }: { searchParams: Promis const password = config?.password_login === true; const mod = Array.isArray(params.mod) ? params.mod[0] : params.mod; const initialMode = mod === "elfelejtett" ? "forgot" : mod === "regisztracio" || rawToken ? "register" : "login"; + // Facebook's and other apps' built-in browsers: Google refuses to sign in + // there, so the e-mail form comes first and the way out to the phone's own + // browser (this same page, with its invitation or referral) is offered. + const inApp = inAppBrowser((await headers()).get("user-agent") ?? ""); + const query = new URLSearchParams(); + for (const [key, value] of Object.entries(params)) { + for (const v of Array.isArray(value) ? value : [value]) query.append(key, v); + } + const here = `${await siteUrl()}/belepes${query.size ? `?${query}` : ""}`; + + const google = + clientId && !inApp ? ( + + ) : null; + const apple = + clientId && appleId ? ( + + ) : null; + const social = + google || apple ? ( +
    + {google} + {apple} +
    + ) : null; + const passwordForm = password ? ( + + ) : null; + const or = + social && passwordForm ? ( +
    + vagy +
    + ) : null; return (
    @@ -149,35 +193,25 @@ export default async function LoginPage({ searchParams }: { searchParams: Promis {rawToken && ( )} + {inApp && config !== null && } {config === null ? (

    A szerver most nem érhető el. Próbáld újra egy kicsit később.

    ) : clientId || password ? ( - <> - {clientId && ( -
    - - {appleId && ( - - )} -
    - )} - {clientId && password && ( -
    - vagy -
    - )} - {password && ( - - )} - + inApp ? ( + <> + {passwordForm} + {or} + {social} + + ) : ( + <> + {social} + {or} + {passwordForm} + + ) ) : (

    A Google-belépés még nincs beállítva (a backend GOOGLE_CLIENT_IDS változója üres). diff --git a/services/frontend/src/app/globals.css b/services/frontend/src/app/globals.css index 98100f6..013a8ef 100644 --- a/services/frontend/src/app/globals.css +++ b/services/frontend/src/app/globals.css @@ -1034,8 +1034,6 @@ a.pair-row:hover strong { color: var(--gold); } .lp-caption { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; } .lp-caption .share-trio { justify-content: center; font-size: 15px; } .lp-asc { color: var(--gold); font-weight: 600; font-size: 12px; letter-spacing: 0.5px; } -.lp-rise { opacity: 0; transform: translateY(14px); animation: lp-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; } -.lp-r1 { animation-delay: 0.1s; } .lp-r2 { animation-delay: 0.25s; } .lp-r3 { animation-delay: 0.4s; } .lp-r4 { animation-delay: 0.55s; } .lp-band { border-top: 1px solid var(--line); padding: 96px 0; } .lp-alt { background: var(--panel-2); } @@ -1112,7 +1110,6 @@ body:has(.qdock-fab) .site-footer { padding-bottom: 88px; } @keyframes lp-fade { to { opacity: 1; } } @keyframes lp-draw { to { stroke-dashoffset: 0; } } @keyframes lp-spin { to { transform: rotate(360deg); } } -@keyframes lp-rise { to { opacity: 1; transform: none; } } @keyframes lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } } @keyframes lp-pulse { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.6); opacity: 0.2; } } @media (max-width: 900px) { .lp-analysis-grid { grid-template-columns: minmax(0, 1fr); } } @@ -1141,7 +1138,7 @@ body:has(.qdock-fab) .site-footer { padding-bottom: 88px; } } @media (prefers-reduced-motion: reduce) { .lp *, .lp-orbit { animation: none !important; } - .lp-rise, .lp-wheel .w-point { opacity: 1; transform: none; } + .lp-wheel .w-point { opacity: 1; transform: none; } .lp-wheel .w-aspect { stroke-dashoffset: 0; } .lp-wheel .w-aspect.w-asp-sextile { opacity: 1; } } @@ -1853,3 +1850,11 @@ span.tarot-fan-card { cursor: default; } .update-note-later { border: 0; background: none; color: var(--ink-2, #c9cfdc); font: inherit; font-size: 14px; cursor: pointer; padding: 6px; } .update-note-later:hover { color: var(--gold); } @media (max-width: 479px) { .update-note { flex-wrap: wrap; justify-content: center; text-align: center; } } + +/* Login inside Facebook's or another app's built-in browser: why, and the way out. */ +.inapp-note { + display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; font-size: 14px; + border: 1px solid rgba(217, 180, 106, 0.45); background: rgba(217, 180, 106, 0.07); border-radius: 10px; +} +.inapp-note p { margin: 0; color: var(--ink-2); } +.inapp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; } diff --git a/services/frontend/src/app/privacy/page.tsx b/services/frontend/src/app/privacy/page.tsx index 36eed97..687c552 100644 --- a/services/frontend/src/app/privacy/page.tsx +++ b/services/frontend/src/app/privacy/page.tsx @@ -124,6 +124,11 @@ const DATA: [string, string, string][] = [ "Security, troubleshooting, preventing abuse", "Legitimate interest (Art. 6(1)(f))", ], + [ + "Which page you opened, where you came from, your browser and device type, your country and how long the page took to load (visitor statistics)", + "Seeing how many people view each page and whether the site is fast enough", + "Legitimate interest (Art. 6(1)(f))", + ], ]; /** The privacy policy in English (the Hungarian one at /adatvedelem is the same in content). */ @@ -305,6 +310,8 @@ export default async function PrivacyPolicyPage() { Cloudflare, Inc.: delivering traffic and protecting against attacks; processes your IP address and request data when the site loads. On the e-mail sign-up and password request forms its Turnstile service checks that a person, not a script, sends the form (looking at browser features too). + Its Web Analytics service measures visits and page speed without cookies or any identifier stored in the + browser, and does not follow individual visitors.

  • Google LLC: signing in with a Google account. @@ -369,7 +376,12 @@ export default async function PrivacyPolicyPage() {

    We use a cookie that is strictly necessary for the service (sf_session), which keeps you signed in. If you choose the light or dark theme on the forum, a second cookie (sf_forum_theme) keeps - your choice for a year; it stores nothing else. We use no advertising or tracking cookies and no analytics. + your choice for a year; it stores nothing else. We use no advertising or tracking cookies. +

    +

    + Visits are counted by Cloudflare Web Analytics, without cookies or any identifier stored in the browser. + When a page loads, a small script sends which page you opened, where you came from, your browser and device + type, and how long the page took to load. We only see totals and cannot follow individual visitors.

    On the public birth chart page (no account needed), the birth data you enter are sent only for the diff --git a/services/frontend/src/lib/inAppBrowser.ts b/services/frontend/src/lib/inAppBrowser.ts new file mode 100644 index 0000000..151d424 --- /dev/null +++ b/services/frontend/src/lib/inAppBrowser.ts @@ -0,0 +1,35 @@ +/** + * The browsers built into apps: Facebook, Messenger, Instagram, TikTok, and + * other Android apps that show pages in their own window (WebView). Google + * does not allow signing in with a Google account in them (its error page + * says "disallowed_useragent"), so the login page offers the e-mail login + * and a way out to the phone's own browser instead. + */ +export interface InAppBrowser { + /** The app's name for the text ("Facebook"); null for an unknown app. */ + app: string | null; + android: boolean; +} + +export function inAppBrowser(userAgent: string): InAppBrowser | null { + const android = /Android/i.test(userAgent); + let app: string | null = null; + if (/Instagram/i.test(userAgent)) app = "Instagram"; + else if (/MessengerForiOS|Orca-Android|FB_IAB\/MESSENGER/i.test(userAgent)) app = "Messenger"; + else if (/FBAN|FBAV|FB_IAB|FBIOS|FB4A/.test(userAgent)) app = "Facebook"; + else if (/TikTok|musical_ly|Bytedance/i.test(userAgent)) app = "TikTok"; + if (app) return { app, android }; + // Any other Android app's window: "; wv)" in the browser's name. + if (android && /; wv\)/.test(userAgent)) return { app: null, android }; + return null; +} + +/** + * A link that opens the page in Chrome on Android, out of the app's window. + * Without Chrome the phone falls back to the same page. + */ +export function chromeIntent(url: string): string { + const u = new URL(url); + const fallback = encodeURIComponent(url); + return `intent://${u.host}${u.pathname}${u.search}#Intent;scheme=${u.protocol.replace(":", "")};package=com.android.chrome;S.browser_fallback_url=${fallback};end`; +} diff --git a/services/frontend/src/lib/legal.ts b/services/frontend/src/lib/legal.ts index e80dad6..bffdb9e 100644 --- a/services/frontend/src/lib/legal.ts +++ b/services/frontend/src/lib/legal.ts @@ -18,8 +18,8 @@ export const ARBITRATION_BOARD = { web: "https://panaszrendezes.hu", }; -export const PRIVACY_UPDATED = "2026. november 26."; -export const PRIVACY_UPDATED_EN = "26 November 2026"; +export const PRIVACY_UPDATED = "2026. november 27."; +export const PRIVACY_UPDATED_EN = "27 November 2026"; /** The terms (ÁSZF) in force; the backend records this version with every purchase (TERMS_VERSION). */ export const TERMS_UPDATED = "2026. november 26.";