# Email codes

With the `magic_code` method on, a user enters an email address and receives a six-digit code.

- A code lasts 10 minutes, allows 5 attempts and works once.
- It is bound to the browser that asked for it through a `__Host-` cookie, so a code phished into another browser does not work. You can relax this with `bind_browser: false` in `PUT /v1/user_management/settings` when users often open the email on another device.
- An unknown address gets the same answer as a known one; no code is sent to it.
- A wrong, expired or used code returns [`user_code_invalid`](/errors/user_code_invalid/).

Sign-up uses the same kind of code to prove the address before an account is created.
