> 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.getWixManagedLogoutUrl(returnToUrl: string) # Method Link: https://dev.wix.com/docs/sdk/host-modules/site/authentication/get-wix-managed-logout-url.md # Method Description: Returns the logout URL for sites that use Wix as their identity provider. Use this function when your site uses a [Wix login page](https://dev.wix.com/docs/go-headless/develop-your-project/self-managed-headless/authentication/members/wix-login-page/about-wix-login-pages.md) to handle member authentication. Wix manages the logout flow and redirects the member back to your site afterward. The returned URL points to the `/api/auth/logout` route. # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Redirect to the Wix logout page ```javascript ```typescript import { getWixManagedLogoutUrl } from '@wix/authentication'; const logoutUrl = getWixManagedLogoutUrl('https://example.com/'); window.location.href = logoutUrl; ``` ``` ## Use with a logout button ```javascript ```typescript import { getWixManagedLogoutUrl } from '@wix/authentication'; function setupLogoutButton() { const button = document.getElementById('logoutButton'); button.onclick = () => { window.location.href = getWixManagedLogoutUrl('/'); }; } ``` ```