---
title: "Limit who can sign up for your app"
description: "Sign-in rules decide who can join the app you built on Hercules. Keep sign-up open, approve emails and domains, or let in only people your SSO signs in."
---

# Limit who can sign up for your app

Sign-in rules decide who can join an app you built on Hercules. Keep sign-up open to everyone, approve a list of email addresses and domains, or let in only people who sign in through single sign-on (SSO) with the service that manages your company's work logins.

- **Three modes.** Choose Allow everyone, Only people I approve, or Only SSO users.
- **Up to 1,000 rules.** Approve one email address or a whole company domain.
- **Checked at every sign-in.** Hercules blocks anyone who no longer matches at their next sign-in.

## What can you control with sign-in rules?

### Choose who can sign up

Pick Allow everyone, Only people I approve, or Only SSO users, and the change takes effect right away. Allow everyone is the default, and switching back to it keeps your saved rules for later. [Who can sign up](https://hercules.app/docs/apps/users-auth/sign-in-rules#who-can-sign-up)

### Approve addresses and whole domains

Paste email addresses or domains one per line, with an optional note. Approve `acme-corp.com` to let in every address at that domain, or `jane@acme-corp.com` to let in one person. [Approve addresses and domains](https://hercules.app/docs/apps/users-auth/sign-in-rules#how-do-i-approve-an-email-address-or-domain)

### Know exactly what a rule matches

Matching ignores case, and a domain rule has to match everything after the @ in full, so `acme-corp.com` doesn't let in `jane@eng.acme-corp.com`. If an address matches both a block rule and an approval, the block wins. [How rules are matched](https://hercules.app/docs/apps/users-auth/sign-in-rules#how-are-rules-matched)

### Let in staff who have no email

Username logins carry an address ending in `@username.invalid`, and text code logins one ending in `@phone.invalid`. Approve one person by copying their full address from Users & Access, or every username login with a `username.invalid` domain rule. [Usernames and phone logins](https://hercules.app/docs/apps/users-auth/sign-in-rules#do-phone-otp-and-username-accounts-work-with-an-allowlist)

### Stay closed if your plan changes

Hercules keeps enforcing saved rules after a plan change, so the app doesn't open up to everyone. You can still see the list after the change. [Plan changes](https://hercules.app/docs/apps/users-auth/sign-in-rules#what-happens-if-my-plan-changes)

## How do you close an app to outsiders?

### 1. Ask for login

> Add login to our job-tracking app so only our office staff and field technicians can use it.

Hercules adds sign-in, and you pick the sign-in methods under Users & Access.

### 2. Approve your people

Under Sign-in Rules, choose Only people I approve and add your company's email domain. For each technician who signs in with a username, copy their full address from Users & Access and add it as an email rule. Hercules saves each rule as soon as you add it.

### 3. Try it from outside

Sign in with an address that isn't on the list. Hercules turns you away, and your app's [sign-in history](https://hercules.app/docs/apps/users-auth/audit-log) records the attempt as Blocked, with the reason Not on the sign-in allowlist.

## What could a business do with it?

In this hypothetical example, a commercial cleaning contractor lets seasonal subcontractors into its shift-scheduling app and out again. One domain rule approves every office worker, so the operations manager never adds staff one by one.

For the busy season she approves eight subcontractors by email address. When the season ends she removes those eight rules, and Hercules blocks each subcontractor at their next sign-in.

## What should you know before you start?

- Editing sign-in rules needs a paid plan, and not every paid plan includes it. The [pricing page](https://hercules.app/pricing) shows which plans do.
- Only SSO users needs single sign-on, which also needs a paid plan.
- Each email address or domain rule can be up to 255 characters.
- Apps created before Hercules Auth 2.0 need a one-time upgrade first. [Upgrade guide](https://hercules.app/docs/apps/users-auth/upgrade-to-hercules-auth-2)

## Related features

- Use [Hercules Auth](/features/authentication) to pick sign-in methods when you first add login.
- Use [Single sign-on](/features/single-sign-on) to connect your identity provider when you want Only SSO users.
- Use [Sign-in history](/features/sign-in-history) to find the blocked attempt when someone says they can't get in.
- Use [Roles and permissions](/features/roles-and-permissions) to decide what each approved person sees inside the app.

## How do you get started?

List who needs access, then approve their domains and addresses. The [sign-in rules docs](https://hercules.app/docs/apps/users-auth/sign-in-rules) cover each option. Start building.

## Frequently asked questions

### What do blocked people see?

People blocked by sign-in rules see "Your email address is not approved to access this app. Contact the app owner to request access." The message never reveals which rules exist or whether the address has already signed up.

### How do I remove someone's access?

To remove someone's access, open the three-dot menu on the row of the rule that lets them in, choose Remove rule, and confirm.

### Do sign-in rules apply to people who use SSO?

Yes. Block rules apply to people who sign in with SSO, and with Only people I approve they must also match your approved emails or domains. [SSO and sign-in rules](https://hercules.app/docs/apps/users-auth/single-sign-on#who-can-sign-in-with-sso)

### Does choosing Only SSO users sign out people already signed in?

Choosing Only SSO users keeps people already signed in until their session ends. The app's other sign-in methods are hidden from then on.

```json
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What do blocked people see?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "People blocked by sign-in rules see \"Your email address is not approved to access this app. Contact the app owner to request access.\" The message never reveals which rules exist or whether the address has already signed up."
      }
    },
    {
      "@type": "Question",
      "name": "How do I remove someone's access?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "To remove someone's access, open the three-dot menu on the row of the rule that lets them in, choose Remove rule, and confirm."
      }
    },
    {
      "@type": "Question",
      "name": "Do sign-in rules apply to people who use SSO?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. Block rules apply to people who sign in with SSO, and with Only people I approve they must also match your approved emails or domains. SSO and sign-in rules"
      }
    },
    {
      "@type": "Question",
      "name": "Does choosing Only SSO users sign out people already signed in?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Choosing Only SSO users keeps people already signed in until their session ends. The app's other sign-in methods are hidden from then on."
      }
    }
  ]
}
```
