Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Disable missing Oculus auth stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
andybak committed Jun 27, 2024
1 parent 8ff2c03 commit a09bb02
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions Assets/Scripts/entitlement/OculusAuth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,37 @@ public class OculusAuth : MonoBehaviour {
private const string OCULUS_APP_ID = "[Removed]]";

private void Awake() {
Oculus.Platform.Core.Initialize(OCULUS_APP_ID);
Oculus.Platform.Entitlements.IsUserEntitledToApplication().OnComplete(EntitlementCallback);
// TODO AB
// Oculus.Platform.Core.Initialize(OCULUS_APP_ID);
// Oculus.Platform.Entitlements.IsUserEntitledToApplication().OnComplete(EntitlementCallback);
}

public void Update() {
Oculus.Platform.Request.RunCallbacks();
// Oculus.Platform.Request.RunCallbacks();
}

private void EntitlementCallback(Oculus.Platform.Message response) {
string message;
if (response.IsError) {
if (response.GetError() != null) {
message = response.GetError().Message;
} else {
message = "Authentication failed";
}
} else {
userIsEntitled = true;
message = "";
}

if (message != string.Empty) {
Debug.Log(message, this);
}

if (!userIsEntitled) {
Debug.Log("User not authenticated! You must be logged in to continue.");
Application.Quit();
}
}
// TODO AB
// private void EntitlementCallback(Oculus.Platform.Message response) {
// string message;
// if (response.IsError) {
// if (response.GetError() != null) {
// message = response.GetError().Message;
// } else {
// message = "Authentication failed";
// }
// } else {
// userIsEntitled = true;
// message = "";
// }
//
// if (message != string.Empty) {
// Debug.Log(message, this);
// }
//
// if (!userIsEntitled) {
// Debug.Log("User not authenticated! You must be logged in to continue.");
// Application.Quit();
// }
// }
}
}

0 comments on commit a09bb02

Please sign in to comment.