Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality. If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers. And always feel free to hit us up on Twitter @MxdRealityDev.

Using Windows Hello Authentication on HoloLens2

Hello everyone.

I'm trying to use Windows Hello Authentication on my Unity/HoloLens2 App.
However I'm having problems with the very first step (checking availability), that's shown in Microsoft's example.
Link: https://docs.microsoft.com/en-us/windows/uwp/security/microsoft-passport-login

When calling Windows.Security.Credentials.KeyCredentialManager.IsSupportedAsync() the App loads a couple of dlls and just stops working.
It does not crash, no error messages. Just a couple of threads exiting with code 0x0 for many minutes (my longest test lasted about 15min, then I stopped the debugging).

Here is my C# code:

using System;
using System.Threading.Tasks;
using UnityEngine;
#if WINDOWS_UWP
using Windows.Security.Credentials;
#endif

namespace MyNamespace
{
    public static class KeyCredentialHelper
    {
        public static async Task<bool> CheckAvailabilityAsync()
        {
         bool available = false;
#if WINDOWS_UWP
         Debug.Log("pre await"); //Get's logged
            available = await KeyCredentialManager.IsSupportedAsync(); //Application stops here
         Debug.Log("post await"); //Doesn't get logged
#else
            Debug.Log("Only Available on UWP!");
#endif
            return available
        }
    }
}

I'm developing in Unity with the MixedReality Toolkit, so the compiler directives are necessary.

And here is the console output from within Visual Studio (after converting to c++):

pre await

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug.bindings.h Line: 45)

'unity-project-authenticate.exe' (Win32): Loaded 'C:\Windows\SysArm32\CryptoWinRT.dll'. 
'unity-project-authenticate.exe' (Win32): Loaded 'C:\Windows\SysArm32\cryptngc.dll'. 
'unity-project-authenticate.exe' (Win32): Loaded 'C:\Windows\SysArm32\ncrypt.dll'. 
'unity-project-authenticate.exe' (Win32): Loaded 'C:\Windows\SysArm32\ntasn1.dll'. 
'unity-project-authenticate.exe' (Win32): Loaded 'C:\Windows\SysArm32\ngcksp.dll'. 

Again, there are no errors, the App "doesn't crash" (It stops working and displaying it's content, but doesn't close).
When I close and reopen the App, a larger version of the loading animation of the HoloLens2 is displayed on eyelevel, but nothing else happens.

Unity 2018.4.23f1

Visual Studio 2019

MRTK 2.4.0 (although this shouldn't have an effect)

What am I missing? Any help greatly appreciated!

Tagged:
Sign In or Register to comment.