NIAEFEUP / uni

Mobile app designed to help students of the University of Porto to manage their academic life.
GNU General Public License v3.0
45 stars 15 forks source link

troca de password sigarra #634

Closed ghost closed 1 year ago

ghost commented 1 year ago

ao trocar a senha do SIGARRA ja estando autenticado, as informações não carregam e não surge nenhum erro até que se termine a sessão e faça login novamente Further information on: https://sentry.io/organizations/niaefeup/issues/?query=6e7fbc07e06340e3b635deb07b25d601

brunogomes30 commented 1 year ago

Nice bug report 🚀

thePeras commented 1 year ago

The app should shut down the user session when the relogin function fails redirecting the user to login page.

lfsjesus commented 1 year ago

As far as I understood, when the app is opened, since the user had already logged in in previous sessions, relogin function from action_creators.dart runs and tries to log in the user again. Lack of internet connection, for example, leads to an exception during this process. However, when it comes to a changed password, what happens is that the login function from network_router.dart returns a Session, in which session.authenticated == false. The function relogin enters, then, in the else statement.

I guess that redirecting the user to the login page inside the else statement solves the problem.