1

Setup Other Page Connect

Follow the guide here to setup Other Page Connect.

2

Build your Unity Game as WebGL

Build your Unity Game as WebGL and import the build into the Next project from above.

3

Pass the idToken generated by Other Page Connect to PlayFab

The Other Page Connect Next.js repository provides a working example of using React Unity WebGL to load your game in React.

 useEffect(() => {
    if (isLoaded && idToken) {
        // DEV: example of sending idToken to Unity through your Controller
        sendMessage("Web3Controller", "OpenIDConnect", idToken);
    }
}, [isLoaded, idToken])
4

Perform actions using Playfab and Other Page API

Now that you have a connection between your game and Other Page accounts, you can perform any number of actions using the Other Page API or PlayFab’s REST API.

Playfab OpenID Connect

View Playfab’s OpenID Connect documentation.