Skip to main content
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 PlayWaveClientReady event
  • isPcCafe is always a boolean
  • reason is one of the values defined in PlayWaveServer.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 + client PC_CAFE event → onVerified
  • Teleport resume: onVerifiedonPcCafe + client PC_CAFE event
The order between the two paths differs — do not depend on it. Use onVerified purely as a “verification flow ended” signal, and put PC-cafe-only side effects inside onPcCafe.

When it does NOT fire

  • TeleportInitFailed session restoration — the player is already verified before the teleport attempt, so re-firing would duplicate for the same player
  • PlayerRemoving — not a verification event

Verify reason values

The reason 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.