Exemple #1
0
        private static async void Test()
        {
            XboxAuthService authService = new XboxAuthService();
            var             authConnect = await authService.StartDeviceAuthConnect();

            Console.WriteLine($"Code: {authConnect.user_code}");

            XboxAuthService.OpenBrowser(authConnect.verification_uri);

            await authService.DoDeviceCodeLogin(Guid.NewGuid().ToString(), authConnect.device_code, CancellationToken.None);
        }
Exemple #2
0
        public BedrockLoginState(GuiPanoramaSkyBox skyBox, Action <PlayerProfile> readyAction, XboxAuthService xboxAuthService)
        {
            Title = "Bedrock Login";
            AuthenticationService = xboxAuthService;
            _backgroundSkyBox     = skyBox;
            Background            = new GuiTexture2D(_backgroundSkyBox, TextureRepeatMode.Stretch);
            BackgroundOverlay     = Color.Transparent;
            Ready = readyAction;

            CanUseClipboard = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);

            ConnectResponse = AuthenticationService.StartDeviceAuthConnect().Result;

            Initialize();
        }