> For the complete documentation index, see [llms.txt](https://docs.cotter.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cotter.app/features/sign-in-with-webauthn.md).

# Sign In with WebAuthn

WebAuthn allows users to authenticate with their device's authenticator, like TouchID or Windows Hello, to websites via their browsers.

![](https://107069962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QGDMRD8y_Kd-BpOvT%2F-MCkItEPBcDK6WsU8E5d%2F-MCkItqjAs5Z18uMfGn-%2Fimage.png?alt=media\&token=965254fa-69d4-4caf-9e90-6a16af50a1f7)

Because WebAuthn is not supported on all browsers yet, **the WebAuthn feature always have a fallback method to Magic Link or OTP verification.**

### Signing Up

![](https://107069962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QGDMRD8y_Kd-BpOvT%2F-MEjJ_pBJ5vip76JhdwQ%2F-MEjNFATmbGxrmg0Ndmb%2FWebAuthnFlow-Enable.png?alt=media\&token=3748bdd3-2e89-4574-9f9c-ffa3104956f9)

When the user first sign up for your website, they don't have a WebAuthn credential set up. The user will first enter their **email** or **phone number:**

* **Step 1:** Verify the user's email or phone number using OTP or Magic Link
* **Step 2:** The SDK will automatically prompt the user to set up WebAuthn for this device.
* **Step 3:** If the user agrees and touch the TouchID sensor, the user can subsequently login using TouchID from the current laptop.

### **Logging In**

![](https://107069962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QGDMRD8y_Kd-BpOvT%2F-MEjJ_pBJ5vip76JhdwQ%2F-MEjO9pP2Gmnu_xbj73G%2FWebAuthnFlow-Login.png?alt=media\&token=8f633bca-bbe5-4fe7-99c7-188f4c4acaa7)

The user may or may not have any WebAuthn credentials set up:

* **Step 1:** The user enters their email or phone number
* **Step 2:** The SDK checks if the user have any WebAuthn credential set up
  * **Yes, the user have a WebAuthn Credential**: The SDK will automatically ask the user to login using WebAuthn. The user have the option to fallback to use Magic Link or OTP
  * **No, the user never setup WebAuthn before:** The SDK will continue authenticating the user using Magic Link or OTP, then ask the user to setup WebAuthn on the current laptop.
