Caution: Fraudulent or imitation websites may appear. Only this site is official. Report concerns on our Report Fraud page.
Authentication is the first system every PlayFab‑powered VR game needs.
It identifies the player, creates their account, and gives your game permission to read and write their data.
This page explains the different login methods, how they work, and which ones are best for VR fangames.
1. What Authentication Does
When a player launches your game, PlayFab:
Creates a new account (if needed)
Assigns a PlayFabID
Returns a session ticket
Loads their profile
Allows your game to access their data
Every PlayFab feature depends on successful authentication.
2. Recommended Login Methods for VR Games
Most VR fangames use one of these:
LoginWithCustomID
Easiest method
Works on all platforms
Good for testing
Not secure for production unless paired with device checks
LoginWithDeviceID
Best for Quest
Uses the device’s unique ID
Automatically creates accounts
No username/password needed
LoginWithAndroidDeviceID (Quest)
Specifically for Android‑based VR devices
Very common in Gtag‑style fangames
LoginWithSteam / LoginWithGoogle
Optional, but good for cross‑platform games.
3. Basic Login Flow
Every login follows this pattern:
Player opens the game
Game sends login request to PlayFab
PlayFab checks if the account exists
If not, PlayFab creates it
PlayFab returns:
PlayFabID
Session ticket
Player profile
Game loads player data
Once authenticated, the player can join Photon.
4. Example Login Structure (Conceptual)
This is the general logic used in most fangames:
Send Login Request
↓
If Success:
Save PlayFabID
Load Player Data
Connect to Photon
Else:
Show Error
This is the foundation for all PlayFab operations.
5. Auto‑Account Creation
PlayFab automatically creates accounts when:
The login ID has never been used
The request includes CreateAccount = true
This makes onboarding seamless — no sign‑up screen needed.
6. Display Names
After login, you can set or update the player’s display name.
Common uses:
In‑game name
Leaderboards
Cosmetics ownership
Moderation tools
Display names can be changed through PlayFab’s API or CloudScript.
7. Authentication Best Practices
Use device‑based login for VR
Avoid usernames/passwords (not needed)
Never expose secret keys in Unity
Validate player identity through PlayFabID
Use CloudScript for secure operations
Log errors for debugging
8. What Comes After Authentication
Once login works, you can move on to:
Player Data
Virtual Currency
Inventory System
CloudScript
Moderation Tools
Title Data
Analytics
Photon + PlayFab Linking
Authentication is the foundation for all of these.