itchannel / fordpass-ha

Fordpass integration for Home Assistant
312 stars 56 forks source link

Using phone number instead of email to login the new workflow? #511

Open doronazl opened 4 months ago

doronazl commented 4 months ago

saw the new 1.7 version method to get the integration working again but cant make how am i supposed to use it in thailand we use phone number instead of email for logging in , so the link generated by the integration wont work because its sending me to a URL that using email as a login what do i do ?

itchannel commented 4 months ago

In the URL it gives you replace https://login.ford.com with https://login.ford.co.th

doronazl commented 4 months ago

In the URL it gives you replace https://login.ford.com with https://login.ford.co.th

tried that, still sending me to a page asking for email

doronazl commented 4 months ago

In the URL it gives you replace https://login.ford.com with https://login.ford.co.th

if i go to ford thailand website and hit login this is the login page link im getting

https://login.ford.co.th/4566605f-43a7-400a-946e-89cc9fdb0bd7/B2C_1A_SignInSignUp_en/oauth2/v2.0/authorize?redirect_uri=https%3A%2F%2Fwww.ford.co.th%2Fen%2Fsupport%2F&response_type=code&state=%7B%22policy%22%3A%22phone_susi_policy%22%2C%22lang%22%3A%22en_th%22%2C%22state%22%3A%22L3ZlaGljbGUtZGFzaGJvYXJkLw%3D%3D%22%2C%22queryHash%22%3A%22%22%2C%22forwardUrl%22%3A%22%22%7D&client_id=77d5d23f-7d9a-4850-aaee-ddb496bb27dd&scope=77d5d23f-7d9a-4850-aaee-ddb496bb27dd%20openid&code_challenge=fn83TsLRjn90uDhqy9Kq1VZQ3VQm-y86SWlcXOq8LoE&code_challenge_method=S256&ui_locales=en&template_id=Ford-MFA-Authentication&ford_application_id=41102da9-fffa-4f5a-8d7c-f822526673dc&country_code=THA&language_code=en-TH quite different than the one coming from the app aint it ?

doronazl commented 4 months ago

In the URL it gives you replace https://login.ford.com with https://login.ford.co.th

tried modifying the link further, changing to th where it says en etc and used this now im getting to a page where its asking for phone i hit dev tools, i see the ?code document, but im not sure which is the token i got something like super long starting with fordapp, copy paste that in the integration, it says unknown error.

https://login.ford.co.th/4566605f-43a7-400a-946e-89cc9fdb0bd7/B2C_1A_SignInSignUp_en-TH/oauth2/v2.0/authorize?redirect_uri=fordapp://userauthorized&response_type=code&max_age=3600&code_challenge=FTcc9JdQ3kduNXKkav-R9fjN3laX7LA32ASU6VqSg_4&code_challenge_method=S256&scope=%2009852200-05fd-41f6-8c21-d36d3497dc64%20openid&client_id=09852200-05fd-41f6-8c21-d36d3497dc64&ui_locales=en-TH&language_code=en-TH&country_code=THA&ford_application_id=5C80A6BB-CF0D-4A30-BDBF-FC804B5C1A98

doronazl commented 4 months ago

was going to try and turn on a debug but how ? normally id go to the integration where it shows an existing device added and the turn on button is there, but i have no added devices so cant go to that page