Member login lets people sign in to access personalized content on a site, such as their profile, saved items, or order history.
Wix Headless supports several ways for members to sign in. The right one depends on who builds the login page and, for a page you build, how members sign in.
- Wix login page. Wix hosts the login UI and runs authentication. Members sign in with an email and password, plus any social providers you enable, such as Google or Facebook. This is the only option when you build with Wix's Astro integration, which handles member login for you. Otherwise, add it with the JS SDK or REST API.
- A login page you build. Choose based on what members sign in with:
- Email and password, verified by Wix. Build a custom login page: you host the UI, and Wix authenticates the credentials. This is best when you want a fully branded login experience. Build it with the JS SDK or REST API.
- An external identity provider. The difference is who runs the provider's sign-in:
- Wix runs it. Sign in with Google or Facebook: you add a provider button to your own UI, and Wix runs the provider's authentication. No API key needed. Works with Google or Facebook on any site, or with a custom single sign-on (SSO) or OpenID Connect (OIDC) connection on Wix Studio enterprise and Wix Channels sites (see Setting up SSO). Available with the JS SDK or REST API.
- You run it. Bring your own identity provider: for a provider you handle yourself, such as GitHub, you run the provider's authentication and sync the result with Wix. This requires a Wix API key, which must be used only in backend code and never exposed in the frontend.
Before implementing member login, make sure you've:
- Set up a headless client to get your client ID.
- Added the allowed redirect URIs that your login flow redirects to.
Some options need additional setup:
- Custom login page: Set your custom login page URL so that Wix-hosted flows requiring login can reach your page.
- Bring your own identity provider: a Wix API key with Members & Contacts permissions.