> 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

## Resource: About Member Login

## Article: About Member Login

## Article Link: https://dev.wix.com/docs/go-headless/authentication/members/about-member-login.md

## Article Content:

# About Member Login

Member login lets people sign in to access personalized content on a site, such as their profile, saved items, or order history.

## Choose how members sign in

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.

```mermaid
flowchart TD
    Q1{"Who builds the login page?"}
    Q1 -->|"Wix builds and hosts it"| A["<b>Wix login page</b><br/><i>Wix builds the page<br/>Wix checks the email and password</i>"]
    Q1 -->|"I build a custom page"| Q2{"How do members sign in?"}
    Q2 -->|"Email / password"| B["<b>Custom login page</b><br/><i>You build the page<br/>Wix checks the email and password</i>"]
    Q2 -->|"An external provider"| Q3{"Is it a provider Wix supports?"}
    Q3 -->|"Yes, Google or Facebook"| D["<b>Sign in with Google or Facebook</b><br/><i>Wix runs the OAuth, no backend needed<br/>The provider signs the member in</i>"]
    Q3 -->|"Yes, via your SSO / OIDC connection"| E["<b>Custom SSO / OIDC connection</b><br/><i>Wix runs the OAuth using a connection you set up<br/>Available only for Wix Studio enterprise and Wix Channels</i>"]
    Q3 -->|"No, any other provider<br/>(for example, GitHub)"| C["<b>Bring your own provider</b><br/><i>Your backend runs the OAuth and needs an API key<br/>The provider signs the member in</i>"]
    classDef flow fill:#2b6cb0,stroke:#1a365d,color:#fff;
    classDef decision fill:#e9d8fd,stroke:#6b46c1,color:#322659;
    classDef warn fill:#fffaf0,stroke:#dd6b20,color:#7b341e;
    class A,B,C,D flow;
    class Q1,Q2,Q3 decision;
    class E warn;
```

- **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](https://dev.wix.com/docs/go-headless/wix-managed-headless/about-the-astro-integration.md), which [handles member login for you](https://dev.wix.com/docs/go-headless/authentication/members/wix-login-page/add-member-login-with-the-astro-integration.md). Otherwise, add it with the [JS SDK](https://dev.wix.com/docs/go-headless/authentication/members/wix-login-page/add-a-wix-login-page-js-sdk.md) or [REST API](https://dev.wix.com/docs/go-headless/authentication/members/wix-login-page/add-a-wix-login-page-rest.md).
- **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](https://dev.wix.com/docs/go-headless/authentication/members/custom-login-page/build-a-custom-login-page-js-sdk.md) or [REST API](https://dev.wix.com/docs/go-headless/authentication/members/custom-login-page/build-a-custom-login-page-rest.md).
  - **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](https://support.wix.com/en/article/sso-setting-up-single-sign-on-sso-login-for-your-site-members)). Available with the [JS SDK](https://dev.wix.com/docs/go-headless/authentication/members/identity-providers/sign-in-with-google-or-facebook-js-sdk.md) or [REST API](https://dev.wix.com/docs/go-headless/authentication/members/identity-providers/sign-in-with-google-or-facebook-rest.md).
    - **You run it.** [Bring your own identity provider](https://dev.wix.com/docs/go-headless/authentication/members/identity-providers/bring-your-own-identity-provider.md): 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.

## Prerequisites

Before implementing member login, make sure you've:

- [Set up a headless client](https://dev.wix.com/docs/go-headless/authentication/setup/set-up-a-headless-client.md) to get your client ID.
- [Added the allowed redirect URIs](https://dev.wix.com/docs/go-headless/authentication/setup/allow-redirect-uris-and-domains.md) that your login flow redirects to.

Some options need additional setup:

- **Custom login page**: [Set your custom login page URL](https://dev.wix.com/docs/go-headless/authentication/members/custom-login-page/set-your-custom-login-page-url.md) so that Wix-hosted flows requiring login can reach your page.
- **Bring your own identity provider**: a [Wix API key](https://dev.wix.com/docs/go-headless/authentication/admin/generate-an-api-key.md) with Members & Contacts permissions.

## See also

- [Add a Wix Login Page (JS SDK)](https://dev.wix.com/docs/go-headless/authentication/members/wix-login-page/add-a-wix-login-page-js-sdk.md)
- [Build a Custom Login Page (JS SDK)](https://dev.wix.com/docs/go-headless/authentication/members/custom-login-page/build-a-custom-login-page-js-sdk.md)
- [Sign In with Google or Facebook (JS SDK)](https://dev.wix.com/docs/go-headless/authentication/members/identity-providers/sign-in-with-google-or-facebook-js-sdk.md)
- [Bring Your Own Identity Provider](https://dev.wix.com/docs/go-headless/authentication/members/identity-providers/bring-your-own-identity-provider.md)