> ## Documentation Index
> Fetch the complete documentation index at: https://docs-staging-quickstart-revamp.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Using Passwordless authentication with Lock for iOS v2

# Lock.swift: Passwordless

Lock <Tooltip tip="Passwordless: Form of authentication that does not rely on a password as the first factor." cta="View Glossary" href="/docs/glossary?term=Passwordless">Passwordless</Tooltip> handles passwordless authentication using email and sms connections. To use Passwordless Authentication you need Lock.Swift version 2.14.0 or greater.

To show Lock, add the following snippet in your `UIViewController`.

```swift lines
Lock
    .passwordless()
    .withOptions {
         $0.oidcConformant = true
    }
    // withConnections, withOptions, withStyle, and so on.
    .onAuth { credentials in
      // Save the Credentials object
    }
    .present(from: self)
```

Passwordless can only be used with a single connection and will prioritize the use of email connections over SMS.

### Passwordless Method

When using Lock Passwordless the default `passwordlessMethod` is `.code` which sends the user a one time passcode to login. If you want to use [Universal Links](/docs/get-started/applications/enable-universal-links-support-in-apple-xcode) you can add the following:

```swift lines
.withOptions {
    $0.passwordlessMethod = .magicLink
}
```

### Activity callback

If you are using Lock Passwordless and have specified the `.magicLink` option to send the user a universal link then you will need to add the following to your `AppDelegate.swift`:

```swift lines
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
    return Lock.continueAuth(using: userActivity)
}
```
