Develop
Develop
Select your platform

Meta Avatars Cross-Play with Non-Meta Environments

This topic explains federated authentication and how to use it to enable the Meta Avatars SDK to cross-play with environments outside of the Meta ecosystem.

Federated authentication

Federated authentication brings compatible Platform Services to VR experiences on non-Meta platforms. Federated apps make service requests for federated users outside the Meta ecosystem. This enables cross-play between federated and primary apps on Meta devices.
This extends to Avatars, giving Unity app developers the ability to deliver Avatar content to users who might not have a Facebook account or a Meta headset. For more information on federated authentication, including a list of other compatible Platform Services, go to Federated Authentication.

Compatibility

Federated authentication supports SteamVR and Windows Mixed Reality VR.
  • SteamVR
  • Windows Mixed Reality VR

    Using federated authentication with Avatars

This section will walk you through how to start using federated authentication with Meta Avatars.
  1. Enable your app to be federated:
    1. In App Manager, click API.
      App Manager API Button
    2. In the API window to the right, click Generate Federated App ID.
      Generate Federated App ID Button
  2. Obtain an access token for your app:
    1. Click Federated App. The federated app access token is located under App Credentials.
      Federated App
  3. Obtain a federated user access token:
    1. If you are creating a new federated user, call federated_user_create specifying a unique persistent ID.
    2. For an existing federated user, call one of the read user APIs.
    3. Retrieve the persistent ID from the {data}persistent_id field in the JSON response payload.
    4. Call federated_user_gen_access_token with the query parameter persistent_id set to the ID you obtained in the previous step. The federated user token is provided in the response.
  4. Initialize the Meta Avatars SDK by calling Meta.Avatar2.OvrAvatarEntitlement.SetAccessToken(string token) with the obtained access token.