# Lock.swift
**Repository Path**: mirrors_auth0/Lock.swift
## Basic Information
- **Project Name**: Lock.swift
- **Description**: A Swift & iOS framework to authenticate using Auth0 and with a Native Look & Feel
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-08
- **Last Updated**: 2026-05-16
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README


[](https://circleci.com/gh/auth0/Lock.swift/tree/master)
[](https://codecov.io/github/auth0/Lock.swift)

📚 [**Documentation**](#documentation) • 🚀 [**Getting Started**](#getting-started) • 💬 [**Feedback**](#feedback)
Migrating from v1? Check the [Migration Guide](MIGRATION.md).
## Documentation
- [**Examples**](EXAMPLES.md) - explains how to use Lock.swift.
- [**Auth0 Documentation**](https://auth0.com/docs) - explore our docs site and learn more about Auth0.
## Getting Started
### Requirements
- iOS 9+
- Xcode 13.x / 14.x
- Swift 4.x / 5.x
**Lock.swift uses Auth0.swift 1.x**.
### Installation
#### Cocoapods
Add the following line to your `Podfile`:
```ruby
pod "Lock", "~> 2.24"
```
Then, run `pod install`.
#### Carthage
Add the following line to your `Cartfile`:
```ruby
github "auth0/Lock.swift" ~> 2.24
```
Then, run `carthage bootstrap --use-xcframeworks --platform iOS`.
#### Swift Package Manager
Open the following menu item in Xcode:
**File > Add Packages...**
In the **Search or Enter Package URL** search box enter this URL:
```text
https://github.com/auth0/Lock.swift
```
Then, select the dependency rule and press **Add Package**.
### Configure the SDK
Head to the [Auth0 Dashboard](https://manage.auth0.com/#/applications/) and create a new **Native** application.
Lock.swift needs the **Client ID** and **Domain** of the Auth0 application to communicate with Auth0. You can find these details in the settings page of your Auth0 application. If you are using a [custom domain](https://auth0.com/docs/brand-and-customize/custom-domains), use the value of your custom domain instead of the value from the settings page.
#### Configure Client ID and Domain with a plist
Create a `plist` file named `Auth0.plist` in your app bundle with the following content:
```xml
For Classic Lock
```swift
Lock
.classic(clientId: "YOUR_AUTH0_CLIENT_ID", domain: "YOUR_AUTH0_DOMAIN")
// ...
```
For Passwordless Lock
```swift
Lock
.passwordless(clientId: "YOUR_AUTH0_CLIENT_ID", domain: "YOUR_AUTH0_DOMAIN")
// ...
```
Using the UIKit app lifecycle
```swift
// AppDelegate.swift
import Lock
// ...
func application(_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey: Any]) -> Bool {
return Lock.resumeAuth(url, options: options)
}
```
Using the UIKit app lifecycle with Scenes
```swift
// SceneDelegate.swift
import Lock
// ...
func scene(_ scene: UIScene, openURLContexts URLContexts: Set
Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?
This project is licensed under the MIT license. See the LICENSE file for more info.