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

Can't login at captcha url generated by carelink_carepartner_api_login.py #87

Closed
KentSanner opened this issue Oct 18, 2024 · 6 comments · Fixed by #90
Closed

Can't login at captcha url generated by carelink_carepartner_api_login.py #87

KentSanner opened this issue Oct 18, 2024 · 6 comments · Fixed by #90

Comments

@KentSanner
Copy link

I'm in the US, I have an active partner account. We also tried using the primary Connect account but couldn't login. While running the script I'm sent to resolve the captcha login at this url:

https://mdtlogin-ocl.medtronic.com/mmcl/auth/oauth/v2/authorize/login?action=display&sessionID=e2565272-660f-4d52-b29b-9101d4a69702&sessionData=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.ew0KICAgICJzZXNzaW9uIjogew0KICAgICAgICAic2Vzc2lvbklEIjoiZTI1NjUyNzItNjYwZi00ZDUyLWIyOWItOTEwMWQ0YTY5NzAyIiwNCiAgICAgICAgImV4cCI6MTcyOTIzMTAwMywNCiAgICAgICAgImN1cnJlbnRfdXNlcm5hbWUiOiIiLA0KICAgICAgICAiY3VycmVudF91c2VyX2NvbnNlbnQiOiJub25lIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9yb2xlIjoiIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9hY3IiOiIwIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9hdXRoVGltZSI6IjAiLA0KICAgICAgICAiY3VycmVudF91c2VyX2F0dHJpYnV0ZXMiOiIiLA0KICAgICAgICAic2FsdCI6IiIsDQogICAgICAgICJ0aGlyZF9wYXJ0eV9zc29fdG9rZW4iOiIiLA0KICAgICAgICAidGhpcmRfcGFydHlfc3NvX3Rva2VuX3R5cGUiOiIiDQogICAgfSwNCiAgICAicmVxdWVzdF9jb25zZW50Ijogew0KICAgICAgICAiY2xpZW50X25hbWUiOiJNQUcrQXV0aG9yaXphdGlvbitTZXJ2ZXIiLA0KICAgICAgICAic2NvcGVfdmVyaWZpZWQiOiJvcGVuaWQrcHJvZmlsZStlbWFpbCIsDQogICAgICAgICJyZXNvdXJjZV92ZXJpZmllZCI6Imh0dHBzJTNBJTJGJTJGbWR0c3RzLW9jbC5tZWR0cm9uaWMuY29tJTJGKiINCiAgICB9LA0KICAgICJyZXF1ZXN0X3BhcmFtZXRlcnMiOiB7DQogICAgICAgICJkaXNwbGF5IjoibG9jYWwiLA0KICAgICAgICAicHJvbXB0IjoibG9naW4rY29uc2VudCIsDQogICAgICAgICJpZF90b2tlbl9oaW50IjoiIiwNCiAgICAgICAgImxvZ2luX2hpbnQiOiIiLA0KICAgICAgICAiYWNyX3ZhbHVlcyI6IiIsDQogICAgICAgICJhY3JfdmFsdWVzX2Vzc2VudGlhbCI6IiIsDQogICAgICAgICJjbGllbnRfaWQiOiJjNzE2YWMzNS1hZTViLTQ4NzAtYmZhMS01NTMwYzY1OTUyZjkiLA0KICAgICAgICAibm9uY2UiOiIiLA0KICAgICAgICAic2NvcGUiOiJvcGVuaWQrcHJvZmlsZStlbWFpbCIsDQogICAgICAgICJyZXNvdXJjZSI6IiIsDQogICAgICAgICJtYXhfYWdlIjogIiINCiAgICB9DQp9.TUzRjXgMv8oeL_TxabvvoUqLLvLhYfqg3AgLgeWwTKo&locale=&countrycode=

I can, however, login here which is a slightly different base url that comes up when web searching "carelink login"

https://mdtlogin.medtronic.com/mmcl/auth/oauth/v2/authorize/login?action=display&sessionID=a84472de-e942-4796-b0ec-a982aa2ca840&sessionData=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.ew0KICAgICJzZXNzaW9uIjogew0KICAgICAgICAic2Vzc2lvbklEIjoiYTg0NDcyZGUtZTk0Mi00Nzk2LWIwZWMtYTk4MmFhMmNhODQwIiwNCiAgICAgICAgImV4cCI6MTcyOTIzMDc1OSwNCiAgICAgICAgImN1cnJlbnRfdXNlcm5hbWUiOiIiLA0KICAgICAgICAiY3VycmVudF91c2VyX2NvbnNlbnQiOiJub25lIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9yb2xlIjoiIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9hY3IiOiIwIiwNCiAgICAgICAgImN1cnJlbnRfdXNlcl9hdXRoVGltZSI6IjAiLA0KICAgICAgICAiY3VycmVudF91c2VyX2F0dHJpYnV0ZXMiOiIiLA0KICAgICAgICAic2FsdCI6IiIsDQogICAgICAgICJ0aGlyZF9wYXJ0eV9zc29fdG9rZW4iOiIiLA0KICAgICAgICAidGhpcmRfcGFydHlfc3NvX3Rva2VuX3R5cGUiOiIiDQogICAgfSwNCiAgICAicmVxdWVzdF9jb25zZW50Ijogew0KICAgICAgICAiY2xpZW50X25hbWUiOiJPQ0wtd2ViYXBwLVVTIiwNCiAgICAgICAgInNjb3BlX3ZlcmlmaWVkIjoib3BlbmlkK3Byb2ZpbGUrcm9sZXMiLA0KICAgICAgICAicmVzb3VyY2VfdmVyaWZpZWQiOiJodHRwcyUzQSUyRiUyRm1kdHN0cy5tZWR0cm9uaWMuY29tJTJGKiINCiAgICB9LA0KICAgICJyZXF1ZXN0X3BhcmFtZXRlcnMiOiB7DQogICAgICAgICJkaXNwbGF5IjoicGFnZSIsDQogICAgICAgICJwcm9tcHQiOiJsb2dpbitjb25zZW50IiwNCiAgICAgICAgImlkX3Rva2VuX2hpbnQiOiIiLA0KICAgICAgICAibG9naW5faGludCI6IiIsDQogICAgICAgICJhY3JfdmFsdWVzIjoiIiwNCiAgICAgICAgImFjcl92YWx1ZXNfZXNzZW50aWFsIjoiIiwNCiAgICAgICAgImNsaWVudF9pZCI6IjhmNDFhZjYyLWU3OTItNDQ4MS04ZDRjLWFlODQyMzE5ODQzZSIsDQogICAgICAgICJub25jZSI6IiIsDQogICAgICAgICJzY29wZSI6Im9wZW5pZCtwcm9maWxlK3JvbGVzIiwNCiAgICAgICAgInJlc291cmNlIjoiIiwNCiAgICAgICAgIm1heF9hZ2UiOiAiIg0KICAgIH0NCn0.Ajpii_2iRRQH9xX_hukP-QelMn2LPcNcPXUpQ9Jv0RQ&locale=en&countrycode=us

Maybe also worth noting that I tried the "Forgot Username" button through the captcha url but medtronic couldn't find an account with my username. I used that same username to login successfully via the url I found from my web search.

i also tried adding locale=en&countrycode=us to the captcha url since the landing page does seem specific to US and non-US and I still couldn't login.

Any help would be really great! I used this integration in the past to automate lights in my bedroom so I don't have to check my phone in the middle of the night if I'm worried about my partner. We really appreciate this work.

@jmutnick
Copy link

Same issue here. It stopped working, seemed to have an expired token, and I cannot obtain new credentials via the script for the same reasons..

When I set is_us_region=True

The code provides this as the sso_url and the site does not exist

https://carelink.minimed.com/configs/v1/sso_cp_us_v6.json

@AdhocAdam
Copy link

Just making sure others see this - ondrej1024/carelink-python-client#26

@yo-han
Copy link
Owner

yo-han commented Dec 6, 2024

I fixed this issue in a new pre-release. Anyone who can test this and confirm it is working?

@AdhocAdam
Copy link

Been running 24 hours and have maintained a connection. Forced a reload just now and still continuing to work and see logindata.json updated with expected timestamps.

Within the last 24 hours though, I do have 3 warnings that came up in logs. But they don't seem to have an impact as far as I can tell.

  • Detected blocking call to open with args ('custom_components/carelink/logindata.json', 'r') inside the event loop by custom integration 'carelink' at custom_components/carelink/api.py, line 412: token_data = json.loads(open(filename, "r").read()) (offender: /config/custom_components/carelink/api.py, line 412: token_data = json.loads(open(filename, "r").read()))
  • Detected blocking call to load_verify_locations with args (<ssl.SSLContext object at 0x14cdfd9839b0>,) inside the event loop by custom integration 'carelink' at custom_components/carelink/api.py, line 107: self._async_client = httpx.AsyncClient() (offender: /usr/local/lib/python3.13/site-packages/httpx/_config.py, line 149: context.load_verify_locations(cafile=cafile))
  • Detected blocking call to open with args ('custom_components/carelink/logindata.json', 'w') inside the event loop by custom integration 'carelink' at custom_components/carelink/api.py, line 404: with open(filename, 'w') as f: (offender: /config/custom_components/carelink/api.py, line 404: with open(filename, 'w') as f:)

@AdhocAdam
Copy link

Thought I'd report back in that it's been a couple days now and still running fine on the pre-release. Still have the same 3 warnings above, but again don't seem to have any impact as far as I can tell.

@KentSanner
Copy link
Author

KentSanner commented Dec 14, 2024

I'd love to be helpful and test the pre-release, especially since you all are kindly working on this issue. Alas, I spent about 90 minutes trying to figure out how to interact with pre-release in my live environment and could not.

So sorry, I'm still learning how to be an active contributor. Once again, really appreciate this tool and the attention it receives!

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

Successfully merging a pull request may close this issue.

4 participants