# Membership

The CodeMash Membership module is your all-in-one solution for authentication, authorization, user profile management, and real-time workflow automation. Whether you’re building a web, mobile, or AI-driven application, Membership empowers you to onboard users, manage access, automate engagement, and keep your project secure—without unnecessary complexity.

***

### Key Concepts

* **Authentication:** Multiple sign-up/sign-in methods, including social logins and passwordless options.
* **Authorization:** Granular control with roles, permissions, and custom policies.
* **User Profiles:** Rich, extensible user data with tagging and custom properties.
* **Integrations:** Seamless OAuth and enterprise identity provider support.
* **Triggers & Automation:** Instantly respond to user events with emails, push, SMS, or custom code actions.

***

### Quick Start

The Membership module is enabled by default in every new CodeMash project.\
Access it via the [CodeMash Dashboard](https://docs.codemash.io/dashboard/membership), SDKs, REST API, or CLI.

***

### Core Features

#### 1. User Management

* Create, update, and delete users
* Support for multiple user types:
  * Guest users
  * Email/password, username/password, phone, passkey (passwordless)
  * Service users (for apps, scripts, automations)
* Rich profile fields: name, last name, phone, company, address, and more
* Custom properties: Extend user profiles with your own schema
* Tagging: Organize and segment users with flexible tags

**See:** [Users & Profiles](https://app.sintra.ai/membership/users.md)

***

#### 2. Authentication Methods

* Native (email, username, phone, passkey)
* Social sign-in: Apple, Google, Meta (Facebook), Azure AD, X (Twitter)
* Custom sign-up/sign-in rules: Define who can register and how
* Default role assignment for new users

**See:** [Authentication & Sign-In](https://app.sintra.ai/membership/authentication.md)

***

#### 3. Roles & Permissions

* **Role-Based Access Control (RBAC):** Assign roles to users for easy permission management
* **Permission-Based Control:** Fine-grained, AWS-style permissions (database CRUD, file access, membership actions, etc.)
* **Custom Policies:** Combine system permissions into reusable policies
* **Custom Roles:** Group policies and permissions to match your app’s needs

**See:** [Roles & Permissions](https://app.sintra.ai/membership/roles-permissions.md)\
**See:** [Policies](https://app.sintra.ai/membership/policies.md)

***

#### 4. Triggers & Automated Actions

**Automate engagement, notifications, and business workflows in real time.**

* **Event-Based Triggers:**\
  Instantly respond to key membership events:
  * User registration
  * Profile updates (with access to what changed)
  * User deletion
  * User invitations
* **Automated Communication:**
  * Send onboarding emails when a user registers
  * Notify users or admins via push or SMS on profile changes, invitations, or deletions
* **Custom Code Actions:**
  * Trigger your own serverless code functions on any event
  * Pass full user data to your function (e.g., sync new users to a CRM, update analytics, integrate with third-party systems)

**Example Use Cases:**

* Send a welcome email and onboarding guide when a user signs up
* Automatically notify admins if a user updates their company information
* Call a CodeMash code function to push new user data to your marketing CRM

**See:** [Triggers & Automation](https://app.sintra.ai/membership/triggers.md)

***

#### 5. Integrations

* Built-in OAuth for major identity providers
* Enterprise-ready: Azure AD, SAML, and more
* API-first: Integrate with any front-end, mobile app, or AI agent

**See:** [Integrations](https://app.sintra.ai/membership/integrations.md)

***

#### 6. Settings & Security

* Configure registration, verification, and deactivation flows
* Enforce password policies, multi-factor authentication, and more
* Audit logs for membership events

**See:** [Membership Settings](https://app.sintra.ai/membership/settings.md)

***

### Common Use Cases

* Onboarding users with custom flows and automated communication
* Managing teams and access levels in SaaS apps
* Automating user notifications and onboarding tasks
* Integrating secure sign-in for web, mobile, and AI-powered apps
* Real-time integration with third-party systems via code triggers

***

### Next Steps

Explore the following documentation pages for in-depth guides and API references:

* [Users & Profiles](https://app.sintra.ai/membership/users.md)
* [Authentication & Sign-In](https://app.sintra.ai/membership/authentication.md)
* [Roles & Permissions](https://app.sintra.ai/membership/roles-permissions.md)
* [Policies](https://app.sintra.ai/membership/policies.md)
* [Triggers & Automation](https://app.sintra.ai/membership/triggers.md)
* [Integrations](https://app.sintra.ai/membership/integrations.md)
* [Membership Settings](https://app.sintra.ai/membership/settings.md)
* [API Reference](https://app.sintra.ai/membership/api.md)
* [FAQ](https://app.sintra.ai/membership/faq.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.codemash.io/dashboard/membership.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
