Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login error #125

Open
smarthome-w opened this issue Oct 7, 2020 · 2 comments
Open

Login error #125

smarthome-w opened this issue Oct 7, 2020 · 2 comments

Comments

@smarthome-w
Copy link

After command:

python3 example.py -c GB -l gb-GB

I receive link to the login page. After login (empty page, link with redirection in address bar) I've put link into console.

https://gb.m.lgaccount.com/login/iabClose?access_token=<some_token>&refresh_token=<some_token>&oauth2_backend_url=https://gb.lgeapi.com/

After some time I received:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 366, in connect
    self.sock = ssl_wrap_socket(
  File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python3.8/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/lib/python3.8/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/usr/lib/python3.8/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1123)
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='eic.lgthinq.com', port=46030): Max retries exceeded with url: /api/member/login (Caused by SSLError(SSLError(1, '[SSL: DH_KEY_TOO_SMALL] dh key too small (_ssl.c:1123)')))

Platform: Ubuntu 20.04.

Any ideas?

@lucasrosa90
Copy link

I'm trying to do the login, but I'm redirected to a "Not found" page, with the following link:

pi@raspberrypi:~/homeassistant/config/custom_components/wideq $ sudo python3 example.py -c BR -l pt-BR
Log in here:
https://br.m.lgaccount.com/login/sign_in?country=BR&language=pt-BR&svcCode=SVC202&authSvr=oauth2&client_id=LGAO221A02&division=ha&grant_type=password

Then paste the URL where the browser is redirected:
**https://br.m.lgaccount.com/login/iabClose/thirdpartylogin?third_party_type=GGL&front_url=https://br.m.lgaccount.com/login/sign_in?country=BR&language=pt-BR&svcCode=SVC202&authSvr=oauth2&client_id=LGAO221A02&onyx_feature=N&division=ha&show_select_country=N&show_add_services=N&oauthTokenExpiredFlag=N&globalFacebook=false&globalGoogle=false&os_type=PC**
Traceback (most recent call last):
  File "example.py", line 296, in <module>
    main()
  File "example.py", line 292, in main
    example(args.country, args.language, args.verbose, args.cmd, args.args)
  File "example.py", line 228, in example
    client._auth = authenticate(client.gateway)
  File "example.py", line 27, in authenticate
    return wideq.Auth.from_url(gateway, callback_url)
  File "/home/pi/homeassistant/config/custom_components/wideq/wideq/core.py", line 354, in from_url
    access_token, refresh_token = parse_oauth_callback(url)
  File "/home/pi/homeassistant/config/custom_components/wideq/wideq/core.py", line 244, in parse_oauth_callback
    return params['access_token'][0], params['refresh_token'][0]
KeyError: 'access_token'

@pifou25
Copy link
Contributor

pifou25 commented Oct 19, 2020

Hi,
some already had SSL errors, such as the DH KEY TOO SMALL (message with debian, but ubuntu should be the same I presume)
#104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants