# 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](https://107069962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QGDMRD8y_Kd-BpOvT%2F-MEj507IGw7Kaq14L_Kt%2F-MEjHpcQLCKgGtxbn6XJ%2FSignInWithDevice-Registration.png?alt=media\&token=40ecfb27-cf05-4b25-8bd0-598950049139)

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](https://107069962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QGDMRD8y_Kd-BpOvT%2F-MEj507IGw7Kaq14L_Kt%2F-MEjHwvrecyViDUP48sd%2FSignInWithDevice-Login.png?alt=media\&token=4d44dbe7-c1d4-411e-8fb8-36fb8d403072)

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](https://107069962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QGDMRD8y_Kd-BpOvT%2F-MEj507IGw7Kaq14L_Kt%2F-MEjI28l_lHOpx2OlPl6%2FSignInWithDevice-LoginNonTD.png?alt=media\&token=8ec41da8-6d09-4109-991c-ac4b8c0ca402)

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](https://107069962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QGDMRD8y_Kd-BpOvT%2F-MEj507IGw7Kaq14L_Kt%2F-MEjInS_0JWSfygUjI2v%2FSignInWithDevice-AddTD.png?alt=media\&token=77592a62-24a4-4d89-b459-3b9f8d304a31)

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="../../quickstart-guides/react-native-quickstart" %}
[react-native-quickstart](https://docs.cotter.app/quickstart-guides/react-native-quickstart)
{% endcontent-ref %}

{% content-ref url="../../quickstart-guides/flutter-sign-in-with-device" %}
[flutter-sign-in-with-device](https://docs.cotter.app/quickstart-guides/flutter-sign-in-with-device)
{% endcontent-ref %}

{% content-ref url="../../quickstart-guides/ios-quickstart" %}
[ios-quickstart](https://docs.cotter.app/quickstart-guides/ios-quickstart)
{% endcontent-ref %}

## SDK Reference

#### React Native

{% content-ref url="../../sdk-reference/react-native/react-native-sdk-passwordless-login" %}
[react-native-sdk-passwordless-login](https://docs.cotter.app/sdk-reference/react-native/react-native-sdk-passwordless-login)
{% endcontent-ref %}

#### Flutter

{% content-ref url="../../sdk-reference/flutter/sign-in-with-device" %}
[sign-in-with-device](https://docs.cotter.app/sdk-reference/flutter/sign-in-with-device)
{% endcontent-ref %}

**iOS**

{% content-ref url="../../sdk-reference/ios/ios-sdk-passwordless-login" %}
[ios-sdk-passwordless-login](https://docs.cotter.app/sdk-reference/ios/ios-sdk-passwordless-login)
{% endcontent-ref %}

#### Android

{% content-ref url="../../sdk-reference/android/sign-in-with-device" %}
[sign-in-with-device](https://docs.cotter.app/sdk-reference/android/sign-in-with-device)
{% endcontent-ref %}
