-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Error: Login credentials rejected in production #261
Comments
@supermasil Are you running this service from a cloud provider? This message typically means that Tesla's firewall is blocking the request and/or requesting a Captcha, which this library does not currently support. |
@mseminatore Yes I have it on elastic beanstalk. The interesting part is I didn't have this error when I first launched it. Let me do a bit more searching to see what's blocking it. Thanks Mark |
@supermasil For years now Tesla has been throttling and sometimes blocking some cloud providers. They do this when they feel that they are seeing unreasonable loads from those services. It could be that someone else on beanstalk caused all traffic to Tesla to be throttled or Captcha'd. Have you tried the library on you local PC to confirm that it works there? |
I too am getting |
Same here : using same email/password/home network with android tesla app or tesla website succeed... How can we investigate Android app request exchanges to reproduce it? (website is probably a bit different) |
I am seeing the same here. Though the Tesla Control app was working yesterday. I will try again today to see if something has changed. @GaPhi @bendinwire Are you both using MFA with your accounts? When you login through website are you seeing a Captcha request? |
I do not have MFA on my accounts (I also manage my siblings/parents accounts). I did not get a Captcha when I just logged into Tesla.com. Thanks Mark! |
No MFA for me and no captcha |
The same issue occurred 2 days ago. Login works on tesla.com. |
It looks like Tesla broken login again. I'm searching for whether any solutions have been devised. |
Looking forward to have a fix for this issue. Would love to start working with this package 👍 |
Me too! This is also affecting the Tesla Control application. I may be able to add Captcha support to the app. But that won't really help this library which is often used by server processes. |
Just thought that I would bump this issue and see if anything has been discovered ;/ |
Hi all, same issue here. |
Hah! Answered my own question. I just created a .token file looking something like: |
Is there any more information about this? @tonybroadbent Is your fix a workaround or something? Could you explain more? Thanks! |
There is a free IOS app called 'AuthAppForTesla'. I have this setup on my phone, and it allows me to copy to the clipboard an Access Token. I copied this to my pi, and created a .token file containing the long string, as shown above. Then, the sample code started working again for me. I think there are other ways to get an access token, this is just what I used. The app states they are only valid for 22 days, so it's really just a workaround rather than any sort of fix. Hope this helps; shout if it makes no sense. Obviously the access token would potentially allow someone to steal your car, so don't go pasting it on here!!! |
Nice workaround! :-) In my case I'm using TeslaJS "offline". So that wouldn't really work unfortunately. :-( |
Hello, sorry for my question. When using i always get error : "Error: Login credentials rejected" trying: nodejs ./NodeRed/node_modules/teslajs/samples/login.js [email protected] Mobile App : "tesla token" is not compatible with my mobile phone. So i tested: python3 ./teslapy , which also opens a browser (after entering login-data) the browser show a new URL, which needs to be entered afterwards to the script. { { |
I got a recaptcha request while login which results in "Login credentials rejected" error message. Response-Header for https://auth.tesla.com/oauth2/v3/authorize: |
@rbubke Yes, this is expected. Tesla added recaptcha as a required step in the auth flow. I don't have a solution for TeslaJS at this point. Open to suggestions and PR's. |
@mseminatore How comes that neither the Tesla website nor the Tesla iOS app show a captcha? Is this perhaps switchable? |
@mike-lischke Because they own the auth service and can choose how it behaves. In theory it should be possible to determine how they identify their own apps and an app that behaves identically could masquerade as their website or app. However, that is a lot of work and can easily become a game of cat and mouse with Tesla as they make new changes. |
@mseminatore Yes, that's what I thought too. And that's probably the reason why many Tesla Services/Apps use a token instead of credentials for access. |
Is the captcha also required for exchanging the refresh token? |
No, but I have to have a VPN into the USA (from the UK) |
All 3rd party apps use tokens as well. You can only acquire a token by providing credentials. |
No, once you have a (refresh) token you can exchange it for a new token. |
What's the current status here? Is there a workaround to get a token right now with the recaptcha or are we completely stuck? |
I bet ya Tesla likely doesn't want third party frameworks handling user credentials directly, understandably. I have a feeling this is fighting a losing battle, even if we find a workaround. I think this framework should probably get out of the game of authenticating users itself, and instead pivot to managing and tokens acquired by other means. Would be sweet if on initial seed of an auth token and refresh token by the framework user, the framework stored encrypted values to disk, and then returned the encryption key to the user to store however they wish. From there, subsequent calls to the framework would require that the user provide that key, and the framework would handle the token logic, including refreshing when need be. If this is agreeable, I can do some work around enabling this kind of pattern. |
Hi! Tried that but did not work. Which of the two tokens did you use? Bummer. Loved being able to access my car from my own software. Bobby |
From my experience, the tokens you get from I did find this site that gives you the correct access and refresh tokens for the tesla owner-api: https://tesla-info.com/tesla-token.php |
Yup, and those tokens have an 8hr expiration rather than the typical 45days. Makes it not work for a lot of applications. |
Thanks! The tesla-info.com/teslatoken.php worked like a charm. I used a small nodejs program to write the token to my store file and now my apps are working. Thank you! Hope the teslajs api can be fixed soon. |
Hi Mark,
First of all, thank you for this awesome library. Recently, suddenly in production I have started getting this error while logging in using loginAsync and this doesn't happen in dev at all. This also didn't happen in production before. Can you please help me look into this?
My service is at teslame.net
Thanks a lot!
The text was updated successfully, but these errors were encountered: