> 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.getWixManagedLoginUrl(returnToUrl: string) # Method Link: https://dev.wix.com/docs/sdk/host-modules/site/authentication/get-wix-managed-login-url.md # Method Description: Returns the login 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 login experience and redirects the member back to your site after authentication. The returned URL points to the `/api/auth/login` route. # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Redirect to the Wix login page ```javascript ```typescript import { getWixManagedLoginUrl } from '@wix/authentication'; const loginUrl = getWixManagedLoginUrl('https://example.com/members-area'); window.location.href = loginUrl; ``` ``` ## Use with a login button ```javascript ```typescript import { getWixManagedLoginUrl } from '@wix/authentication'; function setupLoginButton() { const button = document.getElementById('loginButton'); button.onclick = () => { window.location.href = getWixManagedLoginUrl(window.location.href); }; } ``` ```