Beispiel #1
0
        private void FetchOriginAccessToken()
        {
            // Origin
            var resultJson = client.DownloadString("https://accounts.ea.com/connect/auth?client_id=ORIGIN_JS_SDK&response_type=token&redirect_uri=nucleus:rest&prompt=none");

            _originAccess = JsonConvert.DeserializeObject <AccessTokenModelOrigin>(resultJson);
        }
Beispiel #2
0
        private void FetchOriginAccessToken()
        {
            // Origin
            var resultJson = client.DownloadString("https://accounts.ea.com/connect/auth?client_id=ORIGIN_JS_SDK&response_type=token&redirect_uri=nucleus:rest&prompt=none");

            if (resultJson.Contains("login_required"))
            {
                Console.WriteLine($"TOKEN expired, trying to re-login: {Email}");
                _authCodeService?.Remove(Email);
                ReLogin();
            }
            _originAccess = JsonConvert.DeserializeObject <AccessTokenModelOrigin>(resultJson);
        }