FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
101 stars 17 forks source link

The web app or PWA logout when the user is offline #2913

Closed Franco98404 closed 1 week ago

Franco98404 commented 2 weeks ago

Has your issue been reported?

Current Behavior

The web app or PWA logout when the user is offline

Expected Behavior

The web application or PWA must keep the session active and not log out, this is essential for applications that do not connect to the Internet

Steps to Reproduce

  1. Create a login and home page.
  2. Enable custom authentication
  3. Define the initial pages.
  4. Set login actions
  5. Make a web publication with PWA activated.

Now go to the phone

  1. Open the deployment URL.
  2. Log in to the app
  3. Install the PWA
  4. Disable mobile data and Wi-Fi
  5. Open the previously installed PWA.
  6. You will now be logged out.

Reproducible from Blank

Bug Report Code (Required)

IT40jMmA7Y9On7xH15CBcMFFmiQ5JjM4U5ErlMJBaCgoIYyuOpl/evWkPxBWTtO+T1VcJUSmmmYD+c76j97pLflcHxCVRrpOzZFUeBXJcDu7UZOBBbWKP2htP8FMfVSx1MKNhSV5NbNoLkIAwE66I+qQbCbcHrWxIndISq/LZO4=

Context

The problem arises when the app is opened while out of the office and the mobile connection is not good so there may be micro cuts, so if the PWA is opened at that moment the session is closed

Visual documentation

Part 1 https://www.loom.com/share/e87bc6bf975a4ed49cfb2422898de406

Part 2 https://www.loom.com/share/180893ea1cd04b20acd511c3019c3798

Additional Info

No response

Environment

- FlutterFlow version: FlutterFlow V4.1.52+ released May 14, 2024
- Platform: Web
- Browser name and version: Version 124.0.6367.202 (Official Build) (64-bit)
- Operating system and version affected: W11

General

Relative to the time the changes were made, data was lost within

When following my steps to reproduce, data loss happens

paulperez-dev commented 2 weeks ago

Hi @Franco98404! I noticed you used a custom authentication, which needs a token to persist the session.

You can refer to the numeral 2 of this documentation for further information. Please, let me know if this works for you!

Franco98404 commented 2 weeks ago

Hello @paulperez-dev, thanks for clarifying! For this case I decided put nothing for testing purposes but in my real project is set the 4 variables:

I am having a problem replicating the issue, my teammate and I are having issues and sometimes the app logs us out but other times the session stays active so we are very confused and don't know what else to try to replicate the issue :(

paulperez-dev commented 1 week ago

@Franco98404 You can start adding portions of the prod app to the blank project until you find the element, or combination of elements, that causes the issue.

I will be closing this issue since this tracker is for reproducible bugs.