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

Enable your app to be federated:
This section will walk you through how to start using federated authentication with Meta Avatars.
  1. You first will need to enable your app to be federated:
    1. In App Manager, click API.
  2. In App Manager, click API.
    App Manager API Button
    1. In the API window to the right, click Generate Federated App ID.
  3. In the API window to the right, click Generate Federated App ID.
    Generate Federated App ID Button
  4. Next you will need to obtain an access token for your app:
    1. Click Federated App. The federated app access token is located under App Credentials.
      Obtain an access token for your app. Click Federated App. The federated app access token is located under App Credentials.
      Federated App
  5. You next need to obtain a federated user access token. Next, obtain a federated user access token.
  6. If you are creating a new federated user, call federated_user_create specifying a unique persistent ID.
  7. For an existing federated user, call one of the read user APIs.
  8. Retrieve the persistent ID from the {data}persistent_id field in the JSON response payload.
    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. Retrive 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.
  9. 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.
  10. To initialize the Meta Avatars SDK, call Meta.Avatar2.OvrAvatarEntitlement.SetAccessToken(string token) and pass the access token you obtained. Initialize the Meta Avatars SDK by calling Meta.Avatar2.OvrAvatarEntitlement.SetAccessToken(string token) with the obtained access token.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon