Logout silently using a hidden iframe. Clears the session on the auth server without redirecting the current page.
Note: Silent logout may not work in all browsers due to third-party cookie restrictions. For more reliable session cleanup, use logoutWithRedirect.
logoutWithRedirect
Logout configuration
Optional
Timeout in milliseconds (default: 5000)
Promise that resolves when logout is complete or times out
import { logoutSilent } from '@imtbl/auth';try { await logoutSilent({ clientId: 'your-client-id', }); console.log('Logged out silently');} catch (error) { console.error('Silent logout failed:', error); // Fall back to redirect logout} Copy
import { logoutSilent } from '@imtbl/auth';try { await logoutSilent({ clientId: 'your-client-id', }); console.log('Logged out silently');} catch (error) { console.error('Silent logout failed:', error); // Fall back to redirect logout}
Logout silently using a hidden iframe. Clears the session on the auth server without redirecting the current page.
Note: Silent logout may not work in all browsers due to third-party cookie restrictions. For more reliable session cleanup, use
logoutWithRedirect.