[PHP] OAuth with MFA (+ Captcha Code) [Rewrite] #362
Replies: 12 comments 42 replies
-
PERFECT! As i sayed i am working on a WP-Plugin. Adapting your solution into my Plugin didnt work. I had to put your file outside of the WP-Environment -> then it works THX a lot Ralf |
Beta Was this translation helpful? Give feedback.
-
Hi, HTTP/2 302 content-type: text/plain; charset=utf-8 content-length: 197 x-dns-prefetch-control: off x-frame-options: DENY strict-transport-security: max-age=15552000; includeSubDomains x-download-options: noopen x-content-type-options: nosniff x-xss-protection: 1; mode=block x-request-id: 1a0fc263-4534-4399-9dfa-a93de09257fe x-correlation-id: 1a0fc263-4534-4399-9dfa-a93de09257fe content-security-policy: connect-src 'self'; default-src 'none'; font-src 'self' data: fonts.gstatic.com; frame-src 'self' www.google.com www.recaptcha.net; img-src 'self' data:; script-src www.recaptcha.net 'self' 'nonce-4e8c8ceb96fbf3ff9412'; style-src 'unsafe-inline' 'self' location: https://auth.tesla.com/void/callback?code=443823f30e6c3de67e2234f43a2ace4491929bc394c84e8611970811a85d&state=NDY0NjgyMGY2ZTk4&issuer=https%3A%2F%2Fauth.tesla.com%2Foauth2%2Fv3 x-response-time: 94.581ms x-edgeconnect-midmile-rtt: 1 x-edgeconnect-origin-mex-latency: 242 originip: 209.133.79.56 date: Sun, 16 May 2021 06:16:15 GMT set-cookie: tesla-auth.sid=s%3AqjmT8oGuXfOtxnbEqe5x0NW_BQx4jaRr.sCvqIk55jgHI37AmPIwjzK0gEwqxtxY4eReosYWnYIo; Path=/; Expires=Wed, 19 May 2021 06:16:15 GMT; HttpOnly; Secure; SameSite=Lax origin_hostname: auth.tesla.com set-cookie: _abck=A48CB020DE3F9E851EE0BDC00B723E18~-1 Best regards |
Beta Was this translation helpful? Give feedback.
-
Hi, That is not the line with the error. |
Beta Was this translation helpful? Give feedback.
-
Hey all, i have updated my script, see my main topic on the top. If you want to test it, please copy & paste the updated script. Its working now with the new Tesla Captcha-Code. Please try and give me a feedback for any issues. Knowing Issues:
|
Beta Was this translation helpful? Give feedback.
-
keymakerfd this is awesome. I am so close to having this work. I am getting an error about the bearer token. When I dump the response of that call I get a 403 as the result code. array(2) { ["response"]=> string(287) " I have verified that the mfa is valid and I am getting back a code. Not sure what is next. Thank you for any help you can provide. Stac... |
Beta Was this translation helpful? Give feedback.
-
Hello together, @vercorsio thank you very much, it's working, i have it tested with Debian Buster and the issue is now resolved :-) @TuffyMouse can you please copy & paste the updated script und test if it now working on your side? I hope the most issues are resolved in the script ^^ :-) |
Beta Was this translation helpful? Give feedback.
-
Any idea on how to get a token with controls enabled? (this doesn't) Thanks. |
Beta Was this translation helpful? Give feedback.
-
Worked last week, failing now... {"success":0,"message":"Something is wrong ... Http Header is not 302"} |
Beta Was this translation helpful? Give feedback.
-
Hello all, as you already know, Tesla has added a recaptcha to their login procedure. With this, unfortunately, automatic logins are no longer possible. I also solved the refresh problem. Now you can use the Bearer Refresh Token to renew the tokens again without problems (i hope 😂). Please use the new example code from me from now on (see my Main Topic). Please inform me if there are further problems or if something is not understandable. Thank you 😊 |
Beta Was this translation helpful? Give feedback.
-
Hi, Best regards |
Beta Was this translation helpful? Give feedback.
-
Having some problems here. |
Beta Was this translation helpful? Give feedback.
-
So during troubleshooting I tried to manually refresh the token by using the following: But I am getting HTTP/2 403 (Access denied) as a response. Any ideas? |
Beta Was this translation helpful? Give feedback.
-
UPDATE 30.04.2022:
Hi together,
i'm sorry, i was for many days off.
Yeah @benderl u are right, the last step is not longer needed.
I have now updated the script. Please try the new one.
Thank you
Best
Key
UPDATE 12.09.2021:
Hello all,
as you already know, Tesla has added a recaptcha to their login procedure. With this, unfortunately, automatic logins are no longer possible.
I have adapted the script, unfortunately it is not as user-friendly as before, but it is still possible to get the tokens and send commands to the Tesla vehicle.
I also solved the refresh problem. Now you can use the Bearer Refresh Token to renew the tokens again without problems (i hope 😂).
Please use the new example code from me from now on.
Please inform me if there are further problems or if something is not understandable.
Thank you
Best
Key
UPDATE 06.06.2021:
The Script is now updated with the solution from vercorsio (curl sslversion) and a bugfix from shaven ($cookie -> $cookies).
It's working now with Debian Buster (tested from my side). I'm very appreciate, thanks for your help! :-)
Info: Tesla has removed the Captcha-Code, i let it implemented for the future.
UPDATE 31.05.2021: (#362 (comment))
Please check my updated Script, this is working WITH the Captcha Request.
For testings, please create a directory "tmp" with write access for save the cookies.
PHP-Example-Script (12.09.2021):
Beta Was this translation helpful? Give feedback.
All reactions