
# Password sign-in for an app

An organization owner checks **Password** in the app's **Settings** > **Sign-in**. The sign-in page then offers email and password, plus **Set or reset your password**. The app's code doesn't change and never sees a password.

Agent Cloud keeps passwords in the app's own user directory. Use it for people who can't always use Google or an email link: a shared test account with no mailbox, someone whose mail is slow or filtered, or a reviewer you give an account to.

## Ask your agent

```text
I want people to be able to sign in to camp-bookings with a password. What do I do?
```

Your agent can't turn it on. It points you to the app's **Settings** > **Sign-in** in the console, where an organization owner checks **Password**.

## Steps

1. Open the app in the console, go to **Settings** > **Sign-in**.
2. Under **Ways to sign in**, check **Password** and save. Keep at least one way on; Google and **Email link** can stay on alongside it.
3. People set their own: on the sign-in page, **Set or reset your password** emails them a link, sent from agent.cloud's address with the app's name on it. They open it in the same browser, land on **Choose a password**, and go on into the app.
4. Or give one: type the person's email under **Give a password** and press **Give a password**. Agent Cloud makes a 24-character password and shows it to you once, with a copy button. Pass it on yourself. **Remove password** takes it away.

Success is the person signing in with email and password and landing back in the app signed in, the same as with Google.

## How it works

The sign-in page posts the email and password to Agent Cloud, which checks them against the app's own directory and sends the usual code to the app's `/auth/callback`. Trading it at `POST $AGC_AUTH_URL/token` returns the user with `"method": "password"`. A password set for one app signs in to no other.

A password admits nobody on its own. A blocked person is still refused, and an app whose audience is the organization, a group or named people still admits only them. When the app's audience signs in through your organization's company sign-in, the password form and link aren't offered at all, and the console's switch says so.

- **Your own password:** the link proves the address. A weak or breached password is refused with the reason and the form stays. The page to choose one is good for 5 minutes and one use.
- **A password you give:** only to an address that has never signed in to the app, or one whose current password an owner gave. Giving one again replaces it; the old one stops working. Once a person sets their own, it is theirs and an owner can't replace it.
- **Activity:** turning Password on or off, giving a password and removing one each record an entry in the organization's activity log (`app.signin_methods`, `app.password_given`, `app.password_removed`), naming the app, the owner and the email, never the password.
- **Mirrors and rehearsals** keep their test sign-in page, with no password form. A smoke check's `SIGN IN` works as before.

## Errors

| Message | Where | Cause | Fix |
|---|---|---|---|
| Only organization owners change sign-in | Console | You aren't an owner of the app's organization | Ask one of the owners it names |
| Keep one way to sign in | Console | All three switches off | Turn on at least one of Google, Email link and Password |
| ‹email› already signs in to ‹app› | Console, **Give a password** | That person signs in their own way | They use **Set or reset your password** on the sign-in page |
| No password to remove | Console, **Remove password** | That address has no password for the app | Nothing to do |
| That email and password didn't match. | Sign-in page | Unknown email, wrong password, or no password set | Check the address, or use **Set or reset your password** |
| Too many attempts. Try again in an hour. | Sign-in page | Over 30 failed attempts from one IP in an hour | Wait an hour |
| This app doesn't offer password sign-in. | Sign-in page | Password is off for the app (404) | An owner turns it on |
| This link to choose a password expired. | **Choose a password** | Over 5 minutes, or the link was opened in another browser | Go back to the app and set your password again |

## Limits

- Given passwords: 24 characters, shown once, kept by nobody but the sign-in service.
- Failed password attempts: 30 per client IP per hour, across all apps.
- The page to choose a password: 5 minutes, one use.

## Agent notes

- Don't add a login form, a password column or a password library to the app. If a person asks for passwords, send them to **Settings** > **Sign-in**; the app's two sign-in routes already handle it.
- Code that branches on `user.method` should expect `"password"` as well as `"google"`, `"email"` and `"sso"`.

## Related

- [Choosing a sign-in shape](/docs/build/choosing-a-sign-in-shape.md)
- [Platform APIs: sign-in and email](/docs/reference/sign-in-broker-api.md)
- [Company sign-in (SSO) and SCIM](/docs/owners/company-sign-in-and-scim.md)
- [Members, roles, invites, join requests](/docs/owners/members-roles-invites-join-requests.md)

<!-- feedback:start -->
---
Wrong, outdated or unclear? Run `agc feedback docs "owners/password-sign-in-for-an-app: <what is wrong>" --body <file>` with the sentence quoted in the file. No code or app data is sent.
<!-- feedback:end -->
