onVerified is an optional callback passed to PlayWaveServer.init. It fires exactly once per player when the verification flow ends, regardless of whether the player is a PC cafe user.
Without this callback, distinguishing “verification finished but the player is not a cafe user” from “verification still in progress” required polling isPcCafeUser (since onPcCafe only fires for cafe users). onVerified closes that gap.
Signature
- Fires exactly once per
PlayWaveClientReadyevent isPcCafeis always a booleanreasonis one of the values defined inPlayWaveServer.VerifyReason(see below)- Errors thrown inside the callback are caught with
pcall, logged as warnings, and do not break the verify flow
When it fires
onVerified is invoked from inside the PlayWaveClientReady handler — i.e. after the client’s PlayWaveClient script signals readiness to the server. The exact firing point depends on the branch taken:
Firing order with onPcCafe
For PC cafe users on the success path (where both fire):
- Fresh OTT verification:
onPcCafe+ clientPC_CAFEevent →onVerified - Teleport resume:
onVerified→onPcCafe+ clientPC_CAFEevent
When it does NOT fire
TeleportInitFailedsession restoration — the player is already verified before the teleport attempt, so re-firing would duplicate for the same playerPlayerRemoving— not a verification event
Verify reason values
Thereason argument is one of the values defined on PlayWaveServer.VerifyReason:
Usage example
Relationship with onPcCafe
onVerified is purely additive. Existing onPcCafe behavior is unchanged.
Notes
Even when
RESUME_REJECTED indicates the server-side check for a teleport resume failed, the local session is left in place. The next heartbeat will return 404/410 and clean up automatically.