예제 #1
0
파일: Program.cs 프로젝트: lvyitian1/Alex
        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);
        }
예제 #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();
        }