Rank 3: Container
In the final client = Appwrite()..setEndpoint()..setProject()..persistSession=false;
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 3: Container
In the final client = Appwrite()..setEndpoint()..setProject()..persistSession=false;
Rank 3: Container
I'm gonna try that
Rank 3: Container
Oh nvm that variable doesn't exist but I'm gonna try ```import 'package:flutter/services.dart' show rootBundle;
import 'package:localstorage/localstorage.dart';
// Create an instance of LocalStorage
final LocalStorage storage = LocalStorage('my_app');
// Function to clear the stored session data
Future clearSessionData() async {
await storage.clear();
}
// Call clearSessionData after deleting the session
await Account.deleteSession(sessionId);
await clearSessionData();```
Rank 3: Container
Then I'm gonna try reloading the page with ```import 'package:flutter_inappwebview/flutter_inappwebview.dart';
// Function to reload the web page
Future reloadWebPage() async {
await InAppWebViewController?.instance?.reload();
}
// Call reloadWebPage after clearing the session data
await clearSessionData();
await reloadWebPage();```
Admin
Then login with user B and it logs me in as user A.
So. what makes you say this?
Admin
I checked the code for the SDK and confirmed we handle all of this already so you shouldn't have to do any of this.
Rank 3: Container
Nevermund inappwebview isn't supported for web
Rank 3: Container
Oh wow
Rank 3: Container
Yeah it's probably something I'm doing wrong
Rank 3: Container
It does tell me Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint.
Admin
perhaps you have something saved in your application state
Rank 3: Container
That could be it too
Admin
right. once you delete your session. the local storage value should be cleared
Rank 3: Container
Just making sure it's something weird in doing
Rank 3: Container
Can you explain that more or show me
Admin
chrome dev tools > Application > Local Storage
Rank 3: Container
Ahh okay
Rank 3: Container
There's no way to force that?
Admin
Rank 3: Container
Gotcha
Rank 3: Container
How can I get the current sessionId is it the same as the uid
Admin
Rank 3: Container
Okay will do thanks
Rank 3: Container
I think I found the problem. It's the way I'm handling authentication I tried doing it a different way but I found a good way that should work. Thanks alot @Steven
Rank 3: Container
[Solved] logining out and logining in with a different user logs me back as first user