Quick Start Example
import { FunticoSDK } from '@funtico/gameloop-sdk';
// Initialize SDK for frontend use (no client secret needed)const sdk = new FunticoSDK({ authClientId: 'your-auth-client-id', env: 'sandbox' // or 'production'});
// Start authentication flow - simple one-line callawait sdk.signInWithFuntico( window.location.href);
// Get user info - tokens handled automaticallyconst userInfo = await sdk.getUserInfo();
// Submit game scores - authentication includedawait sdk.saveScore(1500);
// Get leaderboard data - shows top players with their scoresconst leaderboard = await sdk.getLeaderboard();
// Sign out - cleanup handled automaticallyawait sdk.signOut('/login');