# Sign In with Email/Phone Number

## How it works

Users can authenticate using just their email or phone number. On their first time using Cotter, they will be prompted to enter a verification code or press a magic link

{% hint style="success" %}
On subsequent authentication requests through any website, they will be able to **instantly get verified without needing a verification code.**
{% endhint %}

## First Ever Sign Up

On their first ever signup to a website/app that uses Cotter, the user have to enter a verification code.

![First ever signup to a website/app that uses Cotter](/files/-M9M-J5jm5GYC1L6z5P6)

#### 1. The user enter their email or phone number

#### 2. They will receive a verification code or magic link to their email or phone number.

The user will then enter the verification code or press the magic link

#### 3. We will return a response in the callback function with the user's email or phone number and a JWT token to verify that the user is authenticated.

{% hint style="success" %}
**✨At this point, we tie the user's browser or device with their email / phone number.** When the user then sign up to another website that uses Cotter, the user **don't need to re-verify their email or phone number.** Instead, our website or SDK will check if we recognize the device with the credentials, and will automatically go to step 3 above.
{% endhint %}

## Subsequent Logins

After the first signup, anytime the user need to sign-up or login to **any website or app that uses Cotter**, the user just needs to enter the email or phone number they want to use, and they'll be **instantly verified**.

![On subsequent logins, the user don't need to enter verification code](/files/-M9M0Ho0FN1zEdY-5_0K)

#### 1. The user enter their email or phone number

#### 2. The user is already verified, and can continue their registration or login :tada:&#x20;

{% hint style="info" %}
Currently our sessions lasts for 30 days. After 30 days, the user have to re-enter a verification code.

In the near future, we will allow you to check **the last login timestamp** and **decide** whether you'd like to **send another verification code or not**.
{% endhint %}

## Quickstarts

{% content-ref url="/pages/-M4bSYVl2B09-3932YAm" %}
[Broken mention](broken://pages/-M4bSYVl2B09-3932YAm)
{% endcontent-ref %}

## Guides

#### Web

{% content-ref url="/pages/-M0ROJn7tosL9qeumqFd" %}
[Sign In with Email/Phone Number](/sdk-reference/web/web-sdk-verify-email-phone.md)
{% endcontent-ref %}

#### React Native

{% content-ref url="/pages/-M1dk\_Rosjlkj52Hq\_6R" %}
[Sign In with Email/Phone Number](/sdk-reference/react-native/react-native-sdk-verify-email-phone.md)
{% endcontent-ref %}

#### iOS

{% content-ref url="/pages/-M35aUobglanfiWqjf7S" %}
[Sign In with Email/Phone Number](/sdk-reference/ios/ios-sdk-verify-email-phone.md)
{% endcontent-ref %}

#### Android

{% content-ref url="/pages/-M0et2D8qa-mVoDh-tjp" %}
[Sign In with Email/Phone Number](/sdk-reference/android/android-sdk-1.md)
{% endcontent-ref %}

#### Other Mobile Apps

{% content-ref url="/pages/-M0QVaCMLRWd0jUsIcYn" %}
[Verify Email/Phone Number](/sdk-reference/api-for-other-mobile-apps/api-for-mobile-apps.md)
{% endcontent-ref %}


---

# 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.cotter.app/features/verify-email-phone.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.
