Economy authentication process


I've built a basic PoC store and have hooked it up to Economy and IAP.

When I debug in the Unity editor, I can see that Economy gets initialized and the anonymous authentication occurs successfully.

On one of my Android devices, I can also see the anonymous authentication taking place (I chuck debug messages to a UIToolkit label in a scrollview). Probably irrelevant, but this device is one that i've used for testing APKs of my previous games.

On a different Android device that is receiving the game through the internal testing track of the play store, I can see that the authentication never occurs. There aren't any errors but the delegate doesn't seem to be getting called as the messages aren't printed.

    private async Task InitializeEconomy()
        var options = new InitializationOptions();

        await UnityServices.InitializeAsync(options);

        AuthenticationService.Instance.SignedIn += delegate
            m_LabelConsole.text += "\nAll signed in and ready to go!";
            m_LabelConsole.text += $"\nPlayer ID is {AuthenticationService.Instance.PlayerId}";
            //m_LabelConsole.text += $"\nAccess Token is {AuthenticationService.Instance.AccessToken}";
        if (AuthenticationService.Instance.IsSignedIn != true)
            await AuthenticationService.Instance.SignInAnonymouslyAsync();

Is there an additional step that I have failed to complete that would allow the authentication to complete on my second device? I've no idea why it's working on the first one, which also received the app through the play store.

I captured more errors and can see that one the failing Android device, the SignInAnonymously call generates an SSL CA Error, so this is an Authentication issue rather than Economy specific.

I've opened a different thread in the Authentication forum:

Hi There,

I've checked your code and can confirm that it should work fine.

Cross-posting the reply from the Authentication thread for visibility:

The SSL / CA Error that you are receiving is down to the Android version on one of your devices.

I have tested your code sample succussfully on API 25 and above and am currently seeking confirmation on the minimum version required.