Suvash - Hi team, when calling https://develope...

Hi team, when calling https://developers.thoughtspot.com/docs/Function_logout#_logout , how long does it takes to clear the sessionInfo? In our app, I am getting the sessionInfo from the AuthStatus.Success after the SDK_SUCCESS to get the currentOrgId. When I logout from the session, and log in using a different user, the SessionInfo being returned belong to the previous user. It happes from the getSessionInfo() call as well. I tried disabling the cache in Network, and it still returns the previous users data.
4 Replies
shikharTS
shikharTS14h ago
What auth type are you using? Also how are you logging in using a different user? are you doing init again? Some code snippet around how you are doing this would help
Suvash
SuvashOP13h ago
Hi @shikharTS Yes, we are using basic auth atm because we don't have a backend service. Its a work in progress. Yes, we are doing init again with the username and password provided by the user. Following way is the current init running: const authStatus = init({ thoughtSpotHost: tsHost, authType: AuthType.Basic, username, password, loginFailedMessage: 'Login failed. Please try again.', customizations: { content: { strings: Constants.TS_STRING_REPLACEMENTS, }, style, iconSpriteUrl, } })
shikharTS
shikharTS13h ago
When you logout and then login using a different user, that should be working as expected, correct? The only issue is with the getSessionInfo call? The session info is cached in the browser, not in network.. as no api call is being made to get the session info again. @Justin Mathew can you also take a look and comment here
Justin Mathew
Justin Mathew10h ago
hey @Suvash how are you doing logout ? when are you calling the logout ? could be that the logout call is getting cancelled can you check the network if any logout api is been triggered hey @Suvash looks liks sdk caches this for performance , we are wokring on providing a fix for this we will relase a new version 1.30.2

Did you find this page helpful?