Your game signs the player in with Firebase Auth, Supabase Auth, or Auth0.
Auth Bridge
Provider proof becomes a Persistly account session.
Use Firebase Auth, Supabase Auth, or Auth0 to prove player identity. Persistly returns the same account session shape the SDK already uses for saves and slots.
Flow
The bridge is a short identity exchange before normal save sync.
The SDK handles the account session returned by Persistly so game code can stay focused on save state.
The game gives the provider token to the Persistly SDK.
Persistly verifies the token for the current project environment and returns a normal Persistly account session.
After sign-in, saveData, loadData, saveSlot, loadSlot, and sync helpers keep working the same way.
SDK Example
Sign in, then save normally.
These SDK helpers are the intended Auth Bridge path. Direct HTTP should stay in custom engines, custom SDKs, and contract tests.
import { PersistlyGameSaves } from "@persistlyapp/sdk";
await PersistlyGameSaves.configure({
runtimeKey: "ps_test_replace_me",
accountMode: "authRequired",
});
const idToken = await getFirebaseIdTokenFromFirebaseAuth();
await PersistlyGameSaves.shared.signInWithFirebaseToken(idToken);
await PersistlyGameSaves.shared.saveData({
level: 5,
coins: 1200,
});Rules
Use the SDK first and keep the direct API as an advanced escape hatch.
Use SDK auth helpers when an SDK is available. They hide account session handling and keep normal save/load code unchanged.
Use the direct auth session API only for custom engines, custom SDKs, advanced integrations, or contract tests.
Runtime keys still choose the Persistly project environment, so configure each auth provider separately for Stage and Production.
Free workspaces can test Auth Bridge with Stage runtime keys. Production Auth Bridge requires a paid workspace plan.
Persistly maps provider identity to a Persistly account. It does not map accounts by email address.
Persistly is not a login UI. Firebase, Supabase, or Auth0 handles sign-in screens, password resets, social provider setup, and player identity UX.
Guides
Pick the provider and account behavior that matches your game.
Configure a Firebase project per Persistly environment and sign in with a Firebase ID token.
Configure a Supabase project URL per Persistly environment and sign in with a Supabase access token.
Configure an Auth0 tenant domain per Persistly environment and sign in with an Auth0 ID or access token.
Choose anonymousFirst or authRequired and handle sign-out and auth conflicts intentionally.
Advanced HTTP contract for custom engines and SDK authors.