> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: authentication.logout() # Method Link: https://dev.wix.com/docs/sdk/host-modules/site/authentication/logout.md # Method Description: Logs out the current member from the site. # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Log out the current member ```javascript ```typescript import { logout } from '@wix/authentication'; try { await logout(); console.log('Logout successful'); // Redirect to home page or login page window.location.href = '/'; } catch (error) { console.error('Logout failed:', error); } ``` ``` ## Log out with a confirmation dialog ```javascript ```typescript import { logout, loggedIn } from '@wix/authentication'; async function handleLogoutClick() { if (!loggedIn()) { console.log('No member is currently logged in'); return; } const confirmed = window.confirm('Are you sure you want to log out?'); if (confirmed) { await logout(); window.location.reload(); } } ``` ```