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 call
await sdk.signInWithFuntico(
// Get user info - tokens handled automatically
const userInfo = await sdk.getUserInfo();
// Submit game scores - authentication included
await sdk.saveScore(1500);
// Get leaderboard data - shows top players with their scores
const leaderboard = await sdk.getLeaderboard();
// Sign out - cleanup handled automatically
await sdk.signOut('/login');