Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

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.

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, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

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.