-
Notifications
You must be signed in to change notification settings - Fork 31
fix: update to new Medtronic auth0 workflow #35
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
base: main
Are you sure you want to change the base?
Conversation
|
Thank you! I was able to get my iOS app working thanks to your PR. 🙏 |
|
great job! but I'm sure what I've to do to fix this issue ... Anyone to help me to describe how to fix this new authentification method? Thanks by advance |
|
@paulobenoit Medtronic uses a more conventional OAuth 2.0 flow (via Auth0 SaaS) now, so this will probably make it easier on your part. I've described what the new flow looks like here NightscoutFoundation/xDrip#4318 (reply in thread) The main change is, that you don't have to do anything before calling the /authentication endpoint and once the browser returned the access code you can directly call the /oauth/token endpoint and thats basically it. The discovery URL has also changed and now contains the key |
|
Added the fix to my copy of the script : Login screen opens but it won't accept my credentials. |
Thats weird, did you use the right location (if you are in the US, use the cli flag |
|
Login on https://carelink.minimed.eu works, verified it before. |
|
@nightfever77 I think it would make sense to open an issue for further discussion.
|
|
You are somehow on the trials version of the config, I'll look into that in a bit |
That was my mistake, I missed a digit when replacing the discovery url. got token data from server |
|
Does the auto renewal not work for you? It is intended that the access token expires after a number of hours but the client should renew the token via the refresh_token |
|
@nightfever77 do you use the follower account on multiple devices per chance? I think they log you out once you log in on another device |
|
I was just reading the scripts output. |
|
I'm from the US, but when I try this new login and click "Sign In", I can see FireFox twirl for a second or two, then it stops twirling and the page just sits at the Sign In screen like I didn't click the "Sign In" button. If I try to click "Sign In" again, the button appears to be disabled. Any ideas? I'm calling: python.exe carelink_carepartner_api_login.py --us It launches the FireFox window and goes to https://carelink-login.minimed.com/u/login... My Python screen is sitting at: I had this working with the old version before Medtronic changed things :( |
|
@meluvalli could you open the Inspector (Developer tools) and look at the networking tab? After you click sign in you should see a redirect to |
|
@m0rt4l1n When I look at the Network Tab in Dev Tools, it shows a POST login?state=.... and a GET resume?state=fs_..... However, the GET command shows: BLOCKED and the Status Code is 302. Not sure if this is part of the problem... Transferred column shows "NS_ERROR_UNKNOWN_PROTOCOL" My python window shows: |
|
The 302 is supposed to happen, please check if the location header is of the following format: If this is right, please check that you are using the newest version of this branch and that you don't have any local changes present (to be sure, just clone the repo again and checkout this PR) If this still doesn't work, add |
|
@m0rt4l1n : I noticed you kept the old Do you think this is still needed? And would this even work? |
IMO it is very unlikely the old login stuff will be needed anytime soon. I think we can also rename the auth0 stuff to just oauth, as most of the login stuff is very generic to just oauth. I didn't have time yet to improve the code quality, I'll try to do this today or tomorrow so this PR becomes mergable :) |
|
@m0rt4l1n I finally figured it out. I was running FireFox 145.0. I uninstalled it, reinstalled it and same thing. So, I checked what the latest version was and it's 146.0.1. I uninstalled 145.0, installed 146.0.1, and voila! It worked now! I don't know why I had to upgrade to 146.0.1 to make it work? I installed my plugins like so: So, selenium is forced at the version I was using before. Any ideas why I would have had to upgrade FireFox to make it work? (Just for my own curiosity) Thank you for your help!!! |
|
The script Unfortunately the initial login procedure needs to resolve the Capcha challenge on the Carelink web page and therefore needs a GUI. But carelink-python-client being an application which mainly runs on headless systems cannon provide that. So this seperate login script is provided to do just that. I have always wondered if there is a better way of doing that. One idea that came to my mind is that a mobile app could be implemented doing the same thing. And thinking some more about this, there already is an app which implements the login procedure, and that is xDrip. Maybe an option could be added to xDrip to export the login data and create the |
|
What made me figure out part of the problem was when m0rt4l1n told me "add Nonetheless, I appreciate the time and effort of this script! I thank you! |
|
Hello guys! I just want to thank you for still maintaining and updating this. I need to take a second look at the APIs for the pump pairing process ;) . The branch works flawlessly for me. |
|
Though it’s off topic, I haven’t seen a CAPTCHA on the Carelink login page recently. |
You are right. I just checked and no CAPTCHA appears on the login page at the moment. But this is probably a temporary glitch. Medtronic might have accidentally removed it and it could be back any time. Looks like there is maintenance activity planned for 13-01-2026 on the Carelink server. Let's wait and see what surprises we'll get 😟 |
|
Actually, I haven't seen CAPTCHA since last October. 😂 |
@m0rt4l1n |


Update the authentication to work with the new Auth0 Authentication, see #34 and NightscoutFoundation/xDrip#4318 (reply in thread)