Photon Oculus Authentication

Content

Application Setup

Adding Oculus as an authentication provider is easy and it could be done in few seconds from your Photon Applications' Dashboard. Go to the "Manage" page of an application and scroll down to the "Authentication" section. If you add a new authentication provider for Oculus or edit an existing one, here the mandatory settings:

  • appid: ID of your Oculus App.
  • appsecret: secret for your Oculus App.

Client Code

Oculus verifies users based on their Oculus ID and a client-provided nonce. In cryptography, a nonce is an arbitrary number that can only be used once. Read more here.

Get Credentials

Client needs to log in to Oculus then generate a nonce. This nonce is proof that the client is a valid Oculus user. You can get Oculus SDKs from their website.

Unity Instructions

Download Oculus Platform SDK for Unity and import it to your project. From the Editor's menu bar, go to "Oculus Platform" -> "Edit Settings" and enter your Oculus AppId. Use the following code to get the logged in user's Oculus ID and generate a nonce:

Authenticate

Client needs to send the Oculus ID and generated nonce as query string parameters with the respective keys "userid" and "nonce":

 To Document Top