# auth.signin

A sign-in with the wrong email or password

Profile: [Errors](https://www.prongs.dev/docs/intents/errors.md) · Raised with: [`fail()`](https://www.prongs.dev/docs/profiles/errors.md) · Status: `401` · Message: generic · Writes: [`security.signin`](https://www.prongs.dev/docs/intents/security/signin.md)

## Example

```ts
return fail('auth.signin');
```

The caller gets

```bash
HTTP 401

{
  "ok": false,
  "error": "Wrong email or password.",
  "code": "auth.signin"
}
```

And it writes security.signin

```ts
{
  "intent": "security.signin",
  "level": "warn",
  "alert": false,
  "message": "Wrong email or password.",
  "data": {
    "intent": "auth.signin"
  },
  "time": "2026-10-09T12:00:00.000Z"
}
```

## Choosing between neighbours

Find the row that describes your case, and use the intent on the right.

| If it is for… | Use |
|---|---|
| A sign-in with the wrong email or password | `auth.signin` (this page) |
| A bad API token, webhook signature or preview secret | [`auth.invalid`](https://www.prongs.dev/docs/intents/auth/invalid.md) |
| A wrong email or password at sign-in (rather than [`auth.invalid`](https://www.prongs.dev/docs/intents/auth/invalid.md)) | `auth.signin` (this page) |

## Connections

Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.

- Built from: [`status.unauthorized`](https://www.prongs.dev/docs/intents/errors.md#status-unauthorized)
- Writes: [`security.signin`](https://www.prongs.dev/docs/intents/security/signin.md)

## For registry authors

**Starter intents.** These are the intents `prongs add errors` puts in your registry, raised with [`fail()`](https://www.prongs.dev/docs/profiles/errors.md). Change the messages to suit your app, and the statuses through the [`status.*`](https://www.prongs.dev/docs/intents/errors.md#status) intents they are built from.

The entry `prongs add errors` writes into your registry. Change the message here, or the status through its [`status.*`](https://www.prongs.dev/docs/intents/errors.md#status) ref.

```ts
'auth.signin': {
  kind: 'semantic',
  description: 'A sign-in with the wrong email or password',
  refs: ['status.unauthorized'],
  binding: {
    publicMessage: 'Wrong email or password.',
    expose: 'generic',
    logs: 'security.signin',
  },
  notFor: [
    {
      context: 'a bad API token, webhook signature or preview secret',
      instead: 'auth.invalid',
    },
  ],
},
```
