2.4.1 (2017-10-19)
Changed
2.4.0 (2017-09-20)
Changed
- Disabled Code coverage Xcode 9 #467 (cocojoe)
- Update Nimble lib and test code (Fixes tests in Xcode 9) #464 (cocojoe)
Fixed
- Fix self retain cycle in DatabaseView #463 (cocojoe)
- Fix - Custom field validation on form submission #462 (cocojoe)
- Fix text replacement on return #460 (cocojoe)
- Fixed Signup Bugs #455 (cocojoe)
- Fix SSO in Database with allow option #450 (cocojoe)
2.3.1 (2017-07-11)
Added
- Added Error message on database user creation if user already exists #443 (f2m2rd)
- Added allowShowPassword option, toggle password text visibility #442 (cocojoe)
Changed
2.3.0 (2017-06-06)
Full Changelog Closed issues
- Add style properties for the status bar #416
- CustomTextField & sign up form should support fields without icons #409
Added
- Added Custom Rule Error support #436 (adolfo)
- Expand Lock style customization #432 (cocojoe)
- 1Password Support for Database Connections #422 (cocojoe)
- Added UnrecoverableError support and retry links #419 (cocojoe)
2.2.0 (2017-04-25)
Added
- Add palpal-sandbox support #431 (ziluvatar)
- NativeAuth provider check and fallback in Auth0OAuth2Interactor #418 (cocojoe)
- Added Passwordless SMS Support #414 (cocojoe)
- Added login_hint support to Enterprise Connections #413 (cocojoe)
- Passwordless Email (Code/Link) and Social #395 (cocojoe)
2.1.0 (2017-03-13)
Added
- Added Connection Scope support for OAuth2 connections #386 (cocojoe)
- Native authentication handler support #377 (cocojoe)
Changed
2.0.0 (2017-02-16)
Added
- Show error when using audience in non OIDC mode #391 (hzalaz)
- Add centralized error processing to Dispatcher #374 (cocojoe)
- Add Fatal Erorrs to UnrecoverableError for Debug Builds #373 (cocojoe)
- Auto close on success event behaviour and customization #370 (cocojoe)
- Critical error handling and presentation #367 (cocojoe)
Changed
- i18n strings file for Base language in Lock #393 (hzalaz)
- Change AD screens styling #384 (hzalaz)
- Navigate to Login screen after ResetPassword and Signup events #369 (cocojoe)
Fixed
- Fixed single connection behaviour for enterprise #387 (hzalaz)
- Fixed crash when loading any enterprise connection with no name #385 (hzalaz)
- Fix signup password policy view enforcement on single screen #371 (cocojoe)
2.0.0-rc.2 (2017-01-10)
Added
- Disable log in after sign up #365 (cocojoe)
- Allow to hide main screen title #362 (cocojoe)
- OIDC Conformant toggle #361 (cocojoe)
Fixed
2.0.0-rc.1 (2016-12-16)
Added
- Feature password policy #354 (cocojoe)
- Enterprise single domain support #343 (cocojoe)
- Enterprise Active Auth #342 (cocojoe)
- Enterprise support with db #340 (cocojoe)
- Enterprise support with social #339 (cocojoe)
- Enterprise Connection only authentication #336 (cocojoe)
Changed
- Compatibility updates against latest Auth0.Swift #356 (cocojoe)
- Allow developer to get controller to show lock. #349 (hzalaz)
- Migrate codebase to Swift 3.0 #345 (cocojoe)
Fixed
2.0.0-beta.2 (2016-09-20)
Added
- Username validation improvements #324 (hzalaz)
- Custom oauth2 style #318 (hzalaz)
- Custom Sign up fields #316 (hzalaz)
- Include more lock options #313 (hzalaz)
- Introduce Lock Style #312 (hzalaz)
- Blur Header background #311 (hzalaz)
- Load connections from Auth0 #310 (hzalaz)
2.0.0-beta.1 (2016-08-19)
Lock for iOS rewritten in Swift
First to import Lock.swift
import Lock
then in your AppDelegate.swift
add the following
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
return Lock.resumeAuth(url, options: options)
}
In order to use Lock you need to provide your Auth0 Client Id and Domain, either with a Property List file
Auth0 ClientId & Domain can be found in your Auth0 Dashboard
In your application bundle you can add a plist
file named Auth0.plist
with the following format
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ClientId</key>
<string>{YOUR_CLIENT_ID}</string>
<key>Domain</key>
<string>{YOUR_DOMAIN}</string>
</dict>
</plist>
Lock Classic handles authentication using Database, Social & Enterprise connections.
Currenty Lock.swift only supports Database & Social authentication and you need to tell Lock what connections it should use
To show Lock.swift, add the following snippet in any of your UIViewController
Lock
.classic()
.connections {
$0.database(name: "Username-Password-Authentication", requiresUsername: true)
}
.options {
$0.closable = false
}
.on { result in
switch result {
case .Success(let credentials):
print("Obtained credentials \(credentials)")
case .Failure(let cause):
print("Failed with \(cause)")
case .Cancelled:
print("User cancelled")
}
}
.present(from: self)
Eventually Lock.swift will be able to load your client configuration automatically, but until then you should describe what connections it should use.
Before presenting Lock.swift you can tell it what connections it should display and use to authenticate an user. You can do that by calling the method and supply a closure that can specify the connections
.connections { connections in
// Your connections
}
So if you need a database connection you can call
connections.database(name: "{CONNECTION_NAME}", requiresUsername: true)
Or a social connection
connections.social(name: "{CONNECTION_NAME}", style: .Facebook)
In Lock.swift options you can turn on/off logging capabilities
Lock
.classic()
.options {
$0.logLevel = .All
$0.logHttpRequest = true
}