# Giftrang > Gift the right thing, every time ## Pages - [Anniversary](https://giftrang.com/anniversary/): Save picks to your wishlist — sign in free, takes 10 seconds. - [Contact](https://giftrang.com/contact/): We read every message and reply within 1–2 working days. - [Disclaimer](https://giftrang.com/disclaimer/): We believe in full transparency about how Giftrang makes money. - [Find](https://giftrang.com/find/): What's the occasion? - [My Gifts](https://giftrang.com/my-gifts/): Here's what's coming up for your family. - [Dashboard](https://giftrang.com/dashboard/): Loading your dashboard... - [Home](https://giftrang.com/): Track your family's birthdays and anniversaries in one place. - [Join](https://giftrang.com/join/): import { initializeApp } from 'https://www.gstatic.com/firebasejs/10.12.2/firebase-app.js'; import { getAuth, GoogleAuthProvider, signInWithPopup } from 'https://www.gstatic.com/firebasejs/10.12.2/firebase-auth.js'; import { getFirestore, doc, getDoc, setDoc, updateDoc } from 'https://www.gstatic.com/firebasejs/10.12.2/firebase-firestore.js'; const firebaseConfig = { apiKey: "AIzaSyByuWFXGHo8Yi354pRpIeHuBIAvbFEtJIw", authDomain: "giftrang.firebaseapp.com", projectId: "giftrang", storageBucket: "giftrang.firebasestorage.app", messagingSenderId: "60506739055", appId: "1:60506739055:web:d08de68b4cfeddc86f189a" }; const app = initializeApp(firebaseConfig); const auth = getAuth(app); const db = getFirestore(app); const GR_SHEET_URL = 'https://script.google.com/macros/s/AKfycbzSiKgJWahIZjdagCy4FLrci-hiExNaCl--9t0Ezi1l9U7e4dK3C8F252ylbnukUdSz/exec'; const API_BASE = 'https://giftrang-api.vercel.app'; // ── STATE ───────────────────────────────────────────────────────────────────── let grFirebaseUser = null; let grUser = { name: '', wa: '', email: '', city: '', members: [] }; let grPendingInviteData = null; // ── URL PARAMS ──────────────────────────────────────────────────────────────── const _urlParams = new URLSearchParams(window.location.search); const _inviteToken = _urlParams.get('invite'); const _fromName = _urlParams.get('from'); // Gap 7: owner's first name const _nextDashboard = _urlParams.get('next') === 'dashboard'; // ── LOADING ─────────────────────────────────────────────────────────────────── function grShowLoading(msg) { document.getElementById('gr-loading').classList.remove('hidden'); document.getElementById('gr-loading-msg').textContent = msg || 'Loading…'; } function grHideLoading() { document.getElementById('gr-loading').classList.add('hidden'); } // ── TOKEN UTILS ─────────────────────────────────────────────────────────────── function grRandomId() { if (typeof crypto !== 'undefined' && crypto.randomUUID) return crypto.randomUUID().replace(/-/g,''); return Math.random().toString(36).slice(2) + Date.now().toString(36) + Math.random().toString(36).slice(2); } // ── GAP 7: Pre-auth invite context ─────────────────────────────────────────── // Runs immediately on load — before auth resolves — to update the auth screen // with the inviter's name so the page feels personal before sign-in. - [Privacy Policy](https://giftrang.com/privacy-policy/): What data we collect, how we use it, and how we protect it. - [Terms & Conditions](https://giftrang.com/terms-conditions/): The rules for using Giftrang — plain language, no legalese. - [About](https://giftrang.com/about/): Giftrang exists so that the next time you need to give someone something meaningful, you don't spend two hours scrolling through sponsored noise. - [Wedding Gifts](https://giftrang.com/wedding-gifts/) - [Diwali Gifts](https://giftrang.com/diwali-gifts/): Save picks to your wishlist — sign in free, takes 10 seconds. - [Birthday Gifts](https://giftrang.com/birthday/): Honest picks across every age and budget — no filler, no noise. Ships across India. - [Housewarming Gifts](https://giftrang.com/housewarming-gifts/): Save picks to your wishlist — sign in free, takes 10 seconds. - [Occasions](https://giftrang.com/occasions/) ## Optional - [Agent (MCP protocol)](websites-agents.hostinger.com/giftrang.com/mcp) [comment]: # (Generated by Hostinger Tools Plugin)