-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session expired after closing the application , even if does not cross 2hrs session expiration time #46
Comments
@wrteam-priyansh first of all, sorry for a longtime answer. It happens because we don't save session data to storage only to variables and they clean by the system after the app destroy. You have the right logic for session managing, but your code can be simplified by using callback |
@TatankaConCube Thanks for replying , i have used this code in order to restore session...
but still i have to follow the login process after closing the app. |
It is expected behavior when we create a new session after app closing. If you don't want to recreate the session after app closing, you can save the active session in storage then after app opening set it as an active session via: CubeSession savedSession; // get saved session
CubeSessionManager.instance.activeSession = savedSession; |
@TatankaConCube Thanks for replying. will try this soon |
@TatankaConCube do we have to follow login process every time opens application? |
It is required if you use API calls. It needs to provide an additional security level for your app. |
Session expires after closing the application and also CubeChatConnection.instance.isAuthenticated() become false even after login..Is this expected behaviour or i am missing something
This is my login function..
//To login into connnectyCube
static Future loginToConnectyCube(BuildContext context) async {
//Checking if session is valid or not
CubeSession cubeSession = CubeSessionManager.instance.activeSession;
}
The text was updated successfully, but these errors were encountered: