noi-techpark / it.bz.noi.community.ios

NOI Community App for iOS
GNU General Public License v3.0
1 stars 1 forks source link

MyAccount / Logout working #109

Open RudiThoeni opened 2 years ago

RudiThoeni commented 2 years ago

Describe the bug When accessing on "My Account" an error message "impossibile caricare i dati del profilo" appears. I logged in yesterday and retried today.... Yesterday i tried to do a login / logout and everything worked, seems like if some time passes some token gets invalid?

To Reproduce Steps to reproduce the behavior:

  1. Login
  2. Wait 1 day
  3. Access My Account
  4. See error

Expected behavior Profile should be loaded, Logout should be possible

Screenshots

Please complete the following information:

matax87 commented 2 years ago

@RudiThoeni Ok we got some bug and I'm going to fix it. In any case I'd like to mention again that:

  1. the access token duration is 5 minutes and the refresh token duration is 60 minutes on the testing machine and 120 in the production one. For the testing machine these kind of durations are fine; but we think that on production they must be incremented/refresh token that never expires; otherwise, logged user will be automatically logged out.

https://github.com/noi-techpark/it.bz.noi.community/issues/18

RudiThoeni commented 2 years ago

@matax87 i have to investigate more on this, how this is done normally......... maybe for this iteration we let it as it is.... and the user has do to re-login if the refresh token expires.... maybe we can increase the refresh_token validity, but setting it to never expires i think is not optimal.........