-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Has your issue been reported?
- I have searched the existing issues and confirm it has not been reported.
- I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.
Current Behavior
I perform a LogOut action inside of a conditional action branch ; the "logout" part is generated at the correct place, but the last instruction (a redirection to the logged out page) is generated outside the condition branch and thus always happen, even when the condition is not met.
Expected Behavior
The redirection only happens when the condition is met.
Steps to Reproduce
- Create a project with authentication
- Create a LoggedIn page
- Create an "On Load" action with a condition
- Add a "LogOut" action to one of the branches
- View code
Reproducible from Blank
- The steps to reproduce above start from a blank project.
Bug Report Code (Required)
ITEels/l25RJpb0B17XicPowiQMwJ0QlUIInj+0bWRMhfarmELMiZffeXElLYteifVZAAFql8VEdw8nGjoaSOsACJk2aGoRDzoRXQTrKTn25aZiSO86KeXdRI+ZMCh2Z37uFpBZvNuxhcUVn1GeAevCdG3qCf9qOYwx5e6fDbOY=
Context
I sometimes delete some accounts outside of the app. When that happens, the user is not automatically logged out, so there is a never ending loading when he goes to the Profile page (which is caused by a query to get the user document that never gets it because it is deleted)
So I added an On Load action to check if the document exists and logs out when it does not exist, avoiding this issue, but now the user is always redirected to my LoggedOut page every time he goes to the profile page.
Visual documentation
Additional Info
No response
Environment
- FlutterFlow version: v4.0
- Platform: Web
- Browser name and version: Chrome Version 116.0.5845.179
- Operating system and version affected: Ubuntu 22.04.3 LTS
