Search Unity

Question AWS / Cognito - difficulties with login

Discussion in 'Scripting' started by jetlius, Feb 21, 2024.

  1. jetlius

    jetlius

    Joined:
    Feb 6, 2018
    Posts:
    11
    Hello!

    I am fairly new to using AWS, but I have been working on an app that uses Cognito for the authentication inside of Unity 2021.3.14, to be deployed in HoloLens 2.

    I have managed to make it work in the editor, and it returns the Id token successfully, but when I build the project and launch it on the HoloLens, nothing happens, and I get no token in response.

    I tried looking where AWS returns the error codes, so I can understand why it isn't working, but as I said, I'm very new to the authentication features, and I couldn't find it.

    Anyone has had this problem or did something similar with the HoloLens, that could help?

    Thank you in advance.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    I would start with looking at the device logs (google for how to get them).

    If there's nothing obviously blowing up, then...

    Networking, UnityWebRequest, WWW, Postman, curl, WebAPI, etc:

    https://forum.unity.com/threads/using-unity-for-subscription-lists.1070663/#post-6910289

    https://forum.unity.com/threads/unity-web-request-acting-stupid.1096396/#post-7060150

    And setting up a proxy can be very helpful too, in order to compare traffic:

    https://support.unity.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity
     
  3. jetlius

    jetlius

    Joined:
    Feb 6, 2018
    Posts:
    11
    I can log stuff on the HoloLens side, when the app is running, the problem is the only thing that I could find online that would be helpful is the IdToken, but that is the variable that I'm not getting, because the authentication isn't happening. I tried looking for other things that would help me if they were logged, but I can't seem to find anything that would show where my problem is.