Open sritharanMobileDev opened 2 months ago
I'm Also facing the same issue. what you fixed in your code.
Here is my sample code.
After continuously using of 10 minutes, app gets logged out.
final sessionConfig = SessionConfig( invalidateSessionForAppLostFocus: Duration( minutes:10), invalidateSessionForUserInactivity: Duration( minutes: 10);
sessionConfig.stream.listen((SessionTimeoutState timeoutEvent) { if (timeoutEvent == SessionTimeoutState.userInactivityTimeout || timeoutEvent == SessionTimeoutState.appFocusTimeout) { // redirect to login screen } });
return SessionTimeoutManager( userActivityDebounceDuration: const Duration(seconds: 1), sessionConfig: sessionConfig, sessionStateStream: sessionStateStream.stream, child: Scaffold(appBar: _appBar(), body: _body()));
Hi, can you check if you can reproduce the same issue in the example app
Yes facing same issue.
Hi @affan3699 , replied on the issue you posted, let me know if that doesn't solve the bug.
I'm Also facing the same issue. what you fixed in your code.
Here is my sample code.
After continuously using of 10 minutes, app gets logged out.
final sessionConfig = SessionConfig( invalidateSessionForAppLostFocus: Duration( minutes:10), invalidateSessionForUserInactivity: Duration( minutes: 10);
sessionConfig.stream.listen((SessionTimeoutState timeoutEvent) { if (timeoutEvent == SessionTimeoutState.userInactivityTimeout || timeoutEvent == SessionTimeoutState.appFocusTimeout) { // redirect to login screen } });
return SessionTimeoutManager( userActivityDebounceDuration: const Duration(seconds: 1), sessionConfig: sessionConfig, sessionStateStream: sessionStateStream.stream, child: Scaffold(appBar: _appBar(), body: _body()));