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

Cant sign-in #38

Closed
bvdkerkhof opened this issue Jun 28, 2023 · 11 comments
Closed

Cant sign-in #38

bvdkerkhof opened this issue Jun 28, 2023 · 11 comments
Labels

Comments

@bvdkerkhof
Copy link

I was having issues with my account and had to reset my password in CareLink itself. This was done succesfully and now can sign-in through the Browser, but after deleting, upgrading CareLink with HACS i'm not able to setup the CareLink integration anymore. I have enabled Debug logging and see the following:

2023-06-28 14:32:35.898 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __get_login_session() failed: exception __get_login_session() session response is not OK 504
2023-06-28 14:32:35.899 DEBUG (MainThread) [custom_components.carelink.api] Carelink API: __execute_login_procedure() failed: exception 'sessionID'

This might have to do with the switch of the Auth server as suggested in the latest release (3 hours ago)?

Home Assistant 2023.6.3
CareLink: 2023.6.5

@Mister86NL
Copy link

Fix van @sedy89 hierboven lost het login probleem alhier op.

@yo-han
Copy link
Owner

yo-han commented Jun 29, 2023

New version with a fix is released.

@tloczekt
Copy link

tloczekt commented Jun 29, 2023

I would like to notice you that you hard coded last time new host "mdtlogin-ocl.medtronic.com" , after last Carelink maintenance, but it's true only for EU server. US server host is still "mdtlogin.medtronic.com" so it's better to change the code for more flexible.
I mean 185 line in api.py.

Probably you can use :
login_session_response.url.host to get suitable host server instead of hard coded text

@sedy89
Copy link
Contributor

sedy89 commented Jun 29, 2023

I would like to notice you that you hard coded last time new host "mdtlogin-ocl.medtronic.com" , after last Carelink maintenance, but it's true only for EU server. US server host is still "mdtlogin.medtronic.com" so it's better to change the code for more flexible.
I mean 185 line in api.py.

Probably you can use :
login_session_response.url.host to get suitable host server instead of hard coded text

Yes, you are right. I just saw it on the xdrip PRs. Thanks for the hint!

@hhuitema
Copy link

2023_6 version for me is working again.. :-)

@SmokelessLlama
Copy link

After updating through HACS today I'm now getting:

2023-06-29 12:00:27.474 ERROR (MainThread) [custom_components.carelink] Unexpected error fetching carelink data: 'auth_tmp_token'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/carelink/init.py", line 149, in _async_update_data
recent_data = await self.client.get_recent_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/carelink/api.py", line 467, in get_recent_data
if await self.__get_authorization_token() is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/carelink/api.py", line 429, in __get_authorization_token
auth_token = self.async_client.cookies[CARELINK_AUTH_TOKEN_COOKIE_NAME]

File "/usr/local/lib/python3.11/site-packages/httpx/_models.py", line 1148, in getitem
raise KeyError(name)
KeyError: 'auth_tmp_token'

I noticed line 185 in api.py is using url = "https://mdtlogin-ocl.medtronic.com" + "/mmcl/auth/oauth/v2/authorize/login" but I'm in the US, do I need to change that to use "login_session_response.url.host"?

version 2023.6.6

@SmokelessLlama
Copy link

I wasn't sure how exactly it should read so I just removed the "-ocl" and it works again.

@tloczekt
Copy link

Screenshot_20230629-223843_Chrome
It can be like this

@yo-han
Copy link
Owner

yo-han commented Jun 30, 2023

Login url fix release ready with version 2023.6.7

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jul 31, 2023
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

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

No branches or pull requests

7 participants