jampez77 / Ryanair

Ryanair Home Assistant Integration
MIT License
3 stars 4 forks source link

Session not maintained #1

Closed jampez77 closed 1 year ago

jampez77 commented 1 year ago

The session is lost after about 30 minutes.

Need to do more work with MITM APK to implement remember me token properly.

jampez77 commented 1 year ago

The app calls https://services-api.ryanair.com/usrprof/v2/accounts/rememberMe when it hasn't been opened in a while.

Headers: X-REMEMBERME-TOKEN X-DEVICE-FINGERPRINT

jampez77 commented 1 year ago

So it looks like it's a dual request:

First we need to request the rememberMeToken from https://services-api.ryanair.com/usrprof/v2/accounts/{{customerId}}/rememberMeToken

and then we request the new token from https://services-api.ryanair.com/usrprof/v2/accounts/rememberMe as above.

Will do some testing on this to make sure. There is no error handling as yet.

jampez77 commented 1 year ago

Should be fixed with the latest release. I will test to confirm

jampez77 commented 1 year ago

Added remember me token to persistence so we can survive restarts.

jampez77 commented 1 year ago

I think perhaps I need to grab and store a rememberMeToken as soon as login token is refreshed

jampez77 commented 1 year ago

Fixed in 2023.9.3