Flutter web session

1,542 views
Skip to first unread message

Abhay Mathur

unread,
Dec 17, 2020, 12:54:37 AM12/17/20
to Flutter Development (flutter-dev)
Hello everyone, 

Currently I am working on flutter web application and struggling with session handling, shared_preference seems not working good here, anyone can suggest something for this, my requirements are:
1. Need to clear session when we close the web browser
2. User should not open the duplicate tab without login (should prompt for login in new tab)

Thanks in advance.

Olena Boiko

unread,
Dec 17, 2020, 4:58:54 PM12/17/20
to Flutter Development (flutter-dev)
Hi. I think you can try to use session storage for this purpose. https://api.flutter.dev/flutter/dart-html/Window/sessionStorage.html 
Description: https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API#Web_Storage_concepts_and_usage
четверг, 17 декабря 2020 г. в 07:54:37 UTC+2, abhay....@fiftyfivetech.io:

Abhay Mathur

unread,
Dec 19, 2020, 2:33:40 AM12/19/20
to Flutter Development (flutter-dev)
Thankyou, this will really help.
Reply all
Reply to author
Forward
0 new messages