PlayEveryWare / eos_plugin_for_unity

Repository for PlayEveryWare's EOS Plugin for Unity, bringing the functionality of Epic Online Services to the Unity Game Engine.
https://eospluginforunity.playeveryware.com
288 stars 56 forks source link

[Help post] DeviceId access credentials not found on the local device. #832

Closed Prabesh002 closed 2 months ago

Prabesh002 commented 2 months ago

Hello, I was testing around and since I wanted to browse the plugin, I wrote a simple script that does this on the start

EOSManager.Instance.StartConnectLoginWithDeviceToken("Nellow", OnLoginCallback);

and the callback is

` void OnLoginCallback(Epic.OnlineServices.Connect.LoginCallbackInfo loginCallbackInfo) {

        if (loginCallbackInfo.ResultCode == Epic.OnlineServices.Result.Success)
        {
            Debug.Log("Login successful!");
        }
        else
        {
            Debug.LogError("Login failed: " + loginCallbackInfo.ResultCode);
        }
    }`

I used mirror's EOS repo before and there I essentially just used the same thing like BUT they had something like Create Device Id thing like this

Epic.OnlineServices.Connect.CreateDeviceIdOptions createDeviceIdOptions = new Epic.OnlineServices.Connect.CreateDeviceIdOptions(); createDeviceIdOptions.DeviceModel = deviceModel; EOS.GetConnectInterface().CreateDeviceId(ref createDeviceIdOptions, null, OnCreateDeviceId);

I also looked into forums, do we need to create device ID credentials? I mean I expected it to be called when the `StartConnectLoginWithDeviceToken` was called :')) 

I know, Silly question but is that so?

Prabesh002 commented 2 months ago

I am so sorry this is the first time I'm doing a code markdown and it's so messy

Prabesh002 commented 2 months ago

Yes it seems like I need to create a device id token.


Epic.OnlineServices.Connect.CreateDeviceIdOptions createDeviceIdOptions = new Epic.OnlineServices.Connect.CreateDeviceIdOptions();
            createDeviceIdOptions.DeviceModel = "Test";
            EOSManager.Instance.GetEOSConnectInterface().CreateDeviceId(ref createDeviceIdOptions, null,OnDeviceCallBack)
             EOSManager.Instance.StartConnectLoginWithDeviceToken("sadas", OnLoginCallback);```