This article describes how to interface with the Miracle Games SDK login interface to open the login window.
Before calling the login interface, make sure you have completed the initialisation of the SDK [ Refer to ].
Recommended Practice:Call the login interface in the callback after successful initialisation.
public MainPage()
{
this.InitializeComponent();
Loaded += (sender, args) =>
{
var auth = await MiracleGames.AuthenticationManager.AuthenticateAsync();//login interface
if (auth.ReturnValue)//login callback
{
//Log in success.
//var uid = MiracleGames.AuthenticationManager.UserInfo.Id;
//var token = MiracleGames.AuthenticationManager.UserInfo.Token;
}
};
}
After the player has successfully logged in, the developer can use MiracleGames.User.AuthenticationManager.UserProfile.Id as the player's unique identifier and then complete the in-game login.