| CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 01:07:17 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=1af8c83d66fd2cc24abe02b2fc21fd87f3451c0d5c17f9ae97746227f9b1dbd1a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22SroZmkgFrIWSwnGAErwpHGBIyZnnnq6X%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d2b30ee858a45e-BLR
useEffect(() => { const checkAuthentication = async () => { setAut - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- useEffect(() => {
- const checkAuthentication = async () => {
- setAuthChecking(true);
- try {
- const hasAuthCookie = document.cookie.includes('authToken=');
- if (hasAuthCookie) {
- setIsAuthenticated(true);
- setAuthChecking(false);
- return;
- }
- if (telegramLoading) {
- console.log('Waiting for Telegram user data to load...');
- return;
- }
- if (telegramError) {
- console.error('Telegram authentication error:', telegramError);
- setAuthChecking(false);
- return;
- }
- if (!telegramUser) {
- console.error('No Telegram user data available');
- setAuthChecking(false);
- return;
- }
- const response = await sendTelegramDataToServer(
- `${process.env.NEXT_PUBLIC_API_URL}/api/auth/telegram`
- );
- if (response?.jwt) {
- const jwt = response.jwt;
- const expiryDate = new Date(Date.now() + 24 * 60 * 60 * 1000);
- document.cookie = `authToken=${jwt}; expires=${expiryDate.toUTCString()}; path=/; SameSite=Strict`;
- localStorage.setItem('authToken', jwt);
- setIsAuthenticated(true);
- }
- } catch (error) {
- console.error('Authentication error:', error);
- } finally {
- setAuthChecking(false);
- }
- };
- checkAuthentication();
- }, [telegramLoading, telegramError, telegramUser]);
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ E
JavaScript | 4 sec ago | 0.25 KB
-
📝 EASY MONEY GUIDE ✅ Working
JavaScript | 10 sec ago | 0.24 KB
-
📌 ChangeNOW Exploit
JavaScript | 24 sec ago | 0.24 KB
-
📌 Instant BTC Profit Method ✅ Working
JavaScript | 36 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ E
JavaScript | 39 sec ago | 0.25 KB
-
📝 MAKE $2500 IN 15 MIN ✅ Working
JavaScript | 45 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ 3
JavaScript | 49 sec ago | 0.25 KB
-
💵 Make 3000$ in 20 minutes 💵
JavaScript | 54 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand