<!--
{
  "documentType" : "article",
  "framework" : "watchOS Apps",
  "identifier" : "/documentation/watchOS-Apps/authenticating-users-on-apple-watch",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Authenticating users on Apple Watch"
}
-->

# Authenticating users on Apple Watch

Create an account sign-up and sign-in strategy for your app.

## Overview

Users can launch an independent watchOS app as soon as it downloads, even if they
don’t have their iPhone. As a result, users must be able to set up the application
directly on Apple Watch. If your app requires an account, users must be able to create
it and sign in on the watch.

You have the following options for syncing or saving user data:

- Create an app that doesn’t require user accounts. Design your app so that it provides
  a full set of features without user accounts, or use CloudKit to sync and store your
  user’s data. Apps can access CloudKit data based on the user’s Apple ID without in-app
  sign-in. watchOS 6 and later also supports CloudKit subscriptions and notifications
  to let your app respond to changes from other devices.
- Authenticate users with Sign In with Apple. This feature authenticates users based
  on their Apple ID. For more information, see <doc://com.apple.documentation/documentation/WatchKit/WKInterfaceAuthorizationAppleIDButton>
  and <doc://com.apple.documentation/documentation/AuthenticationServices>.
- Create custom sign-in and sign-up forms.

If you choose to create custom forms, watchOS 6 provides tools designed to fit the
small screen size and to streamline data entry on Apple Watch.

### Simplify account creation and sign-in

Create your sign-in and sign-up forms using text fields. In SwiftUI, use the <doc://com.apple.documentation/documentation/SwiftUI/TextField>
and <doc://com.apple.documentation/documentation/SwiftUI/SecureField> structures.
In the storyboard, use the <doc://com.apple.documentation/documentation/WatchKit/WKInterfaceTextField> class.

To streamline data entry, perform the following steps:

1. Set the text field’s content type. The text field’s content type modifies how
   the text input controller and Apple Continuity Keyboard behave. For SwiftUI, set
   the content type by calling the text field’s <doc://com.apple.documentation/documentation/SwiftUI/View/textContentType(_:)-4dqqb>
   method. For the storyboard, set the content type using the Attributes inspector.
2. Provide a placeholder that describes the text field’s expected content. Effective
   placeholders help you get the most out of Apple Watch’s smaller screen. For SwiftUI,
   when instantiating the text field, the `title` property sets the placeholder. For
   the storyboard, set the placeholder using the Attributes inspector. Note that the
   system truncates placeholders if the text is too long, so keep your placeholders
   short.
3. Set up your app’s associated domains. If you have a website where users can sign
   in with the same username and password, associate the website’s domain with your
   app. An associated domain tells the Apple Continuity Keyboard to provide autofill
   suggestions for usernames and passwords from that domain. To learn how to set up
   your app’s associated domains, see <doc://com.apple.documentation/documentation/Xcode/supporting-associated-domains>.

### Support password autofill

To support password autofill on Apple Watch, set the following <doc://com.apple.documentation/documentation/WatchKit/WKTextContentType>
values.

|Credential   |Content Type                                                                        |
|-------------|------------------------------------------------------------------------------------|
|User Name    |<doc://com.apple.documentation/documentation/WatchKit/WKTextContentType/username>   |
|Password     |<doc://com.apple.documentation/documentation/WatchKit/WKTextContentType/password>   |
|New Password |<doc://com.apple.documentation/documentation/WatchKit/WKTextContentType/newPassword>|
|One-Time Code|<doc://com.apple.documentation/documentation/WatchKit/WKTextContentType/oneTimeCode>|

For <doc://com.apple.documentation/documentation/SwiftUI/TextField> and <doc://com.apple.documentation/documentation/SwiftUI/SecureField>,
set the content type by calling the <doc://com.apple.documentation/documentation/SwiftUI/View/textContentType(_:)-4dqqb>
method.

```swift
var body: some View {
    VStack {
        TextField("User Name", text: $userName)
            .textContentType(.username)
            .multilineTextAlignment(.center)
        SecureField("Password", text: $password)
            .textContentType(.password)
            .multilineTextAlignment(.center)
        Button("Done") {
        }.disabled(userName.isEmpty || password.isEmpty)
    }
}
```

For <doc://com.apple.documentation/documentation/WatchKit/WKInterfaceTextField>, assign these values in Xcode by setting the
Content Type attribute in the Attributes inspector.

![A screenshot showing the Content Type attribute in the Attributes inspector.](images/com.apple.watchOS-Apps/authenticating-users-on-apple-watch-1@2x.png)

watchOS provides an autofill suggestion for <doc://com.apple.documentation/documentation/WatchKit/WKTextContentType/oneTimeCode>
fields after receiving an SMS message that contains a one-time code.

If you place a <doc://com.apple.documentation/documentation/WatchKit/WKTextContentType/username> or <doc://com.apple.documentation/documentation/WatchKit/WKTextContentType/emailAddress>
text field on the same screen as a <doc://com.apple.documentation/documentation/WatchKit/WKTextContentType/password> text field,
the Apple Continuity Keyboard attempts to fill both fields. Similarly, if you put
two <doc://com.apple.documentation/documentation/WatchKit/WKTextContentType/newPassword> fields on the same screen, the keyboard
automatically fills both when the user selects the suggested password.

For more information, see <doc://com.apple.documentation/documentation/Security/password-autofill>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)