# How it works

There are several different cases for user registration and login, and we're going to cover them all:

### Registration

![Registration with Cotter's Trusted Device](/files/-MEjHpcQLCKgGtxbn6XJ)

When a user registers to your app, you can immediately call Cotter's SDK to register the mobile device as a Trusted Device. This way, the user's account can now be accessed from the trusted device without needing a password.

### Login from a Trusted Device

![Logging-in from a Trusted Device](/files/-MEjHwvrecyViDUP48sd)

Logging in from a trusted device is instant. Your users can immediately access their account without doing anything. Your app can optionally require Biometric/PIN to make it more secure.

### Login from a Non-Trusted Device

![Login from a Non-Trusted Device](/files/-MEjI28l_lHOpx2OlPl6)

If your user try to login from a different phone, or from a web browser, then they will receive a prompt in their Trusted Device, asking them to approve the login request. Once approved, the user can access their account from Non-Trusted Device. **But this doesn't mean that the new device is now a trusted device.** Subsequent logins from a Non-Trusted Device will **always** require approval, even when approved.

### Registering a New Device as a Trusted Device

![Adding a New Trusted Device](/files/-MEjInS_0JWSfygUjI2v)

The user can register another device as an additional Trusted Device. The Trusted Device will need to scan a QR Code shown in the other device to explicitly register that other device as a Trusted Device.

Once the new device is registered as a Trusted Device, the user can now access their account from both devices with ease.

## Quickstarts

{% content-ref url="/pages/-M6Eb1vLZRs1\_0ZAMKrR" %}
[React Native – Sign in with Device](/quickstart-guides/react-native-quickstart.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M9aaGUmTZYju\_sjd17x" %}
[Flutter – Sign in with Device](/quickstart-guides/flutter-sign-in-with-device.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M6EaO2M9ot00du8W\_bR" %}
[iOS – Sign in with Device](/quickstart-guides/ios-quickstart.md)
{% endcontent-ref %}

## SDK Reference

#### React Native

{% content-ref url="/pages/-M2kTuM6W90CT9IpIxHq" %}
[Sign In with Device](/sdk-reference/react-native/react-native-sdk-passwordless-login.md)
{% endcontent-ref %}

#### Flutter

{% content-ref url="/pages/-M9angupK73fWUZjM7fe" %}
[Sign In with Device](/sdk-reference/flutter/sign-in-with-device.md)
{% endcontent-ref %}

**iOS**

{% content-ref url="/pages/-M4q-LjGBIcIq3PgnYt6" %}
[Sign In with Device](/sdk-reference/ios/ios-sdk-passwordless-login.md)
{% endcontent-ref %}

#### Android

{% content-ref url="/pages/-MCxyo3ix-jqWDQysF0g" %}
[Sign In with Device](/sdk-reference/android/sign-in-with-device.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/passwordless-login/how-it-works.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.
