diff --git a/CHANGELOG.md b/CHANGELOG.md index 158de2bb6..ecdde5d7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,48 +1,69 @@ # Change Log -## [2.0.0-rc.2](https://github.com/auth0/Lock.iOS-OSX/tree/2.0.0-rc.2) (2017-01-10) +## [2.0.0](https://github.com/auth0/Lock.swift/tree/2.0.0) (2017-02-16) +[Full Changelog](https://github.com/auth0/Lock.swift/compare/2.0.0-rc.2...2.0.0) **Added** -- Disable log in after sign up [\#365](https://github.com/auth0/Lock.iOS-OSX/pull/365) ([cocojoe](https://github.com/cocojoe)) -- Allow to hide main screen title [\#362](https://github.com/auth0/Lock.iOS-OSX/pull/362) ([cocojoe](https://github.com/cocojoe)) -- OIDC Conformant toggle [\#361](https://github.com/auth0/Lock.iOS-OSX/pull/361) ([cocojoe](https://github.com/cocojoe)) +- Show error when using audience in non OIDC mode [\#391](https://github.com/auth0/Lock.swift/pull/391) ([hzalaz](https://github.com/hzalaz)) +- Add centralized error processing to Dispatcher [\#374](https://github.com/auth0/Lock.swift/pull/374) ([cocojoe](https://github.com/cocojoe)) +- Add Fatal Erorrs to UnrecoverableError for Debug Builds [\#373](https://github.com/auth0/Lock.swift/pull/373) ([cocojoe](https://github.com/cocojoe)) +- Auto close on success event behaviour and customization [\#370](https://github.com/auth0/Lock.swift/pull/370) ([cocojoe](https://github.com/cocojoe)) +- Critical error handling and presentation [\#367](https://github.com/auth0/Lock.swift/pull/367) ([cocojoe](https://github.com/cocojoe)) + +**Changed** +- i18n strings file for Base language in Lock [\#393](https://github.com/auth0/Lock.swift/pull/393) ([hzalaz](https://github.com/hzalaz)) +- Change AD screens styling [\#384](https://github.com/auth0/Lock.swift/pull/384) ([hzalaz](https://github.com/hzalaz)) +- Navigate to Login screen after ResetPassword and Signup events [\#369](https://github.com/auth0/Lock.swift/pull/369) ([cocojoe](https://github.com/cocojoe)) + +**Fixed** +- Fixed single connection behaviour for enterprise [\#387](https://github.com/auth0/Lock.swift/pull/387) ([hzalaz](https://github.com/hzalaz)) +- Fixed crash when loading any enterprise connection with no name [\#385](https://github.com/auth0/Lock.swift/pull/385) ([hzalaz](https://github.com/hzalaz)) +- Fix signup password policy view enforcement on single screen [\#371](https://github.com/auth0/Lock.swift/pull/371) ([cocojoe](https://github.com/cocojoe)) + +## [2.0.0-rc.2](https://github.com/auth0/Lock.swift/tree/2.0.0-rc.2) (2017-01-10) +[Full Changelog](https://github.com/auth0/Lock.swift/compare/2.0.0-rc.1...2.0.0-rc.2) + +**Added** +- Disable log in after sign up [\#365](https://github.com/auth0/Lock.swift/pull/365) ([cocojoe](https://github.com/cocojoe)) +- Allow to hide main screen title [\#362](https://github.com/auth0/Lock.swift/pull/362) ([cocojoe](https://github.com/cocojoe)) +- OIDC Conformant toggle [\#361](https://github.com/auth0/Lock.swift/pull/361) ([cocojoe](https://github.com/cocojoe)) **Fixed** -- Clean memory leaks [\#364](https://github.com/auth0/Lock.iOS-OSX/pull/364) ([hzalaz](https://github.com/hzalaz)) +- Clean memory leaks [\#364](https://github.com/auth0/Lock.swift/pull/364) ([hzalaz](https://github.com/hzalaz)) -## [2.0.0-rc.1](https://github.com/auth0/Lock.iOS-OSX/tree/2.0.0-rc.1) (2016-12-16) -[Full Changelog](https://github.com/auth0/Lock.iOS-OSX/compare/2.0.0-beta.2...2.0.0-rc.1) +## [2.0.0-rc.1](https://github.com/auth0/Lock.swift/tree/2.0.0-rc.1) (2016-12-16) +[Full Changelog](https://github.com/auth0/Lock.swift/compare/2.0.0-beta.2...2.0.0-rc.1) **Added** -- Feature password policy [\#354](https://github.com/auth0/Lock.iOS-OSX/pull/354) ([cocojoe](https://github.com/cocojoe)) -- Enterprise single domain support [\#343](https://github.com/auth0/Lock.iOS-OSX/pull/343) ([cocojoe](https://github.com/cocojoe)) -- Enterprise Active Auth [\#342](https://github.com/auth0/Lock.iOS-OSX/pull/342) ([cocojoe](https://github.com/cocojoe)) -- Enterprise support with db [\#340](https://github.com/auth0/Lock.iOS-OSX/pull/340) ([cocojoe](https://github.com/cocojoe)) -- Enterprise support with social [\#339](https://github.com/auth0/Lock.iOS-OSX/pull/339) ([cocojoe](https://github.com/cocojoe)) -- Enterprise Connection only authentication [\#336](https://github.com/auth0/Lock.iOS-OSX/pull/336) ([cocojoe](https://github.com/cocojoe)) +- Feature password policy [\#354](https://github.com/auth0/Lock.swift/pull/354) ([cocojoe](https://github.com/cocojoe)) +- Enterprise single domain support [\#343](https://github.com/auth0/Lock.swift/pull/343) ([cocojoe](https://github.com/cocojoe)) +- Enterprise Active Auth [\#342](https://github.com/auth0/Lock.swift/pull/342) ([cocojoe](https://github.com/cocojoe)) +- Enterprise support with db [\#340](https://github.com/auth0/Lock.swift/pull/340) ([cocojoe](https://github.com/cocojoe)) +- Enterprise support with social [\#339](https://github.com/auth0/Lock.swift/pull/339) ([cocojoe](https://github.com/cocojoe)) +- Enterprise Connection only authentication [\#336](https://github.com/auth0/Lock.swift/pull/336) ([cocojoe](https://github.com/cocojoe)) **Changed** -- Compatibility updates against latest Auth0.Swift [\#356](https://github.com/auth0/Lock.iOS-OSX/pull/356) ([cocojoe](https://github.com/cocojoe)) -- Allow developer to get controller to show lock. [\#349](https://github.com/auth0/Lock.iOS-OSX/pull/349) ([hzalaz](https://github.com/hzalaz)) -- Migrate codebase to Swift 3.0 [\#345](https://github.com/auth0/Lock.iOS-OSX/pull/345) ([cocojoe](https://github.com/cocojoe)) +- Compatibility updates against latest Auth0.Swift [\#356](https://github.com/auth0/Lock.swift/pull/356) ([cocojoe](https://github.com/cocojoe)) +- Allow developer to get controller to show lock. [\#349](https://github.com/auth0/Lock.swift/pull/349) ([hzalaz](https://github.com/hzalaz)) +- Migrate codebase to Swift 3.0 [\#345](https://github.com/auth0/Lock.swift/pull/345) ([cocojoe](https://github.com/cocojoe)) **Fixed** -- Fixed retain issues between presenter and views [\#355](https://github.com/auth0/Lock.iOS-OSX/pull/355) ([cocojoe](https://github.com/cocojoe)) +- Fixed retain issues between presenter and views [\#355](https://github.com/auth0/Lock.swift/pull/355) ([cocojoe](https://github.com/cocojoe)) -## [2.0.0-beta.2](https://github.com/auth0/Lock.iOS-OSX/tree/2.0.0-beta.2) (2016-09-20) -[Full Changelog](https://github.com/auth0/Lock.iOS-OSX/compare/2.0.0-beta.1...2.0.0-beta.2) +## [2.0.0-beta.2](https://github.com/auth0/Lock.swift/tree/2.0.0-beta.2) (2016-09-20) +[Full Changelog](https://github.com/auth0/Lock.swift/compare/2.0.0-beta.1...2.0.0-beta.2) **Added** -- Username validation improvements [\#324](https://github.com/auth0/Lock.iOS-OSX/pull/324) ([hzalaz](https://github.com/hzalaz)) -- Custom oauth2 style [\#318](https://github.com/auth0/Lock.iOS-OSX/pull/318) ([hzalaz](https://github.com/hzalaz)) -- Custom Sign up fields [\#316](https://github.com/auth0/Lock.iOS-OSX/pull/316) ([hzalaz](https://github.com/hzalaz)) -- Include more lock options [\#313](https://github.com/auth0/Lock.iOS-OSX/pull/313) ([hzalaz](https://github.com/hzalaz)) -- Introduce Lock Style [\#312](https://github.com/auth0/Lock.iOS-OSX/pull/312) ([hzalaz](https://github.com/hzalaz)) -- Blur Header background [\#311](https://github.com/auth0/Lock.iOS-OSX/pull/311) ([hzalaz](https://github.com/hzalaz)) -- Load connections from Auth0 [\#310](https://github.com/auth0/Lock.iOS-OSX/pull/310) ([hzalaz](https://github.com/hzalaz)) - -## [2.0.0-beta.1](https://github.com/auth0/Lock.iOS-OSX/tree/2.0.0-beta.1) (2016-08-19) -[Full Changelog](https://github.com/auth0/Lock.iOS-OSX/compare/f506b849083d9dc24c6d4236b3064d7cde7eac4e...2.0.0-beta.1) +- Username validation improvements [\#324](https://github.com/auth0/Lock.swift/pull/324) ([hzalaz](https://github.com/hzalaz)) +- Custom oauth2 style [\#318](https://github.com/auth0/Lock.swift/pull/318) ([hzalaz](https://github.com/hzalaz)) +- Custom Sign up fields [\#316](https://github.com/auth0/Lock.swift/pull/316) ([hzalaz](https://github.com/hzalaz)) +- Include more lock options [\#313](https://github.com/auth0/Lock.swift/pull/313) ([hzalaz](https://github.com/hzalaz)) +- Introduce Lock Style [\#312](https://github.com/auth0/Lock.swift/pull/312) ([hzalaz](https://github.com/hzalaz)) +- Blur Header background [\#311](https://github.com/auth0/Lock.swift/pull/311) ([hzalaz](https://github.com/hzalaz)) +- Load connections from Auth0 [\#310](https://github.com/auth0/Lock.swift/pull/310) ([hzalaz](https://github.com/hzalaz)) + +## [2.0.0-beta.1](https://github.com/auth0/Lock.swift/tree/2.0.0-beta.1) (2016-08-19) +[Full Changelog](https://github.com/auth0/Lock.swift/compare/f506b849083d9dc24c6d4236b3064d7cde7eac4e...2.0.0-beta.1) Lock for iOS rewritten in *Swift* diff --git a/Cartfile b/Cartfile index 4b41999d3..13c3434c8 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "auth0/Auth0.swift" ~> 1.1 +github "auth0/Auth0.swift" ~> 1.2 diff --git a/Lock.podspec b/Lock.podspec index 9b1060ad6..9707acef0 100644 --- a/Lock.podspec +++ b/Lock.podspec @@ -1,5 +1,4 @@ -# version = `agvtool mvers -terse1`.strip -version = '2.0.0-rc.2' +version = `agvtool mvers -terse1`.strip Pod::Spec.new do |s| s.name = "Lock" s.version = version @@ -9,10 +8,10 @@ Pod::Spec.new do |s| Auth0 is a SaaS that helps you with Authentication and Authorization. You can use Social Providers (Like Facebook, Google, Twitter, etc.), Enterprise Providers (Active Directory, LDap, Windows Azure AD, SAML, etc.) and a Username/Password store which can be saved either by us or by you. We have SDKs for the most common platforms (Ruby, Node, iOS, Angular, etc.) so that with a couple lines of code, you can get the Authentication for your app implemented. Let us worry about Authentication so that you can focus on the core of your business. DESC - s.homepage = "https://github.com/auth0/Lock.iOS-OSX" + s.homepage = "https://github.com/auth0/Lock.swift" s.license = 'MIT' - s.authors = { "Auth0" => "support@auth0.com" }, { "Hernan Zalazar" => "hernan@auth0.com" } - s.source = { :git => "https://github.com/auth0/Lock.iOS-OSX.git", :tag => s.version.to_s } + s.authors = { "Auth0" => "support@auth0.com" }, { "Hernan Zalazar" => "hernan@auth0.com" }, { "Martin Walsh" => "martin.walsh@auth0.com" } + s.source = { :git => "https://github.com/auth0/Lock.swift.git", :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/auth0' s.ios.deployment_target = "9.0" @@ -20,7 +19,7 @@ Auth0 is a SaaS that helps you with Authentication and Authorization. You can us s.requires_arc = true - s.dependency 'Auth0', '~> 1.1' + s.dependency 'Auth0', '~> 1.2' s.default_subspecs = 'Classic' s.subspec 'Classic' do |classic| diff --git a/Lock/Lock.swift b/Lock/Lock.swift index 9e2291f61..0047a38cf 100644 --- a/Lock/Lock.swift +++ b/Lock/Lock.swift @@ -152,7 +152,7 @@ public class Lock: NSObject { .classic() .style { $0.title = "Auth0 Inc." - $0.primaryColor = UIColor.orangeColor() + $0.primaryColor = .orange $0.logo = LazyImage(name: "icn_auth0") } ``` @@ -269,10 +269,7 @@ private func telemetryFor(authentication: Authentication, webAuth: WebAuth) -> ( var authentication = authentication var webAuth = webAuth let name = "Lock.swift" - // FIXME:- Uncomment when stable is ready since XCode wont' accept a tag in the version - // let bundle = _BundleHack.bundle - // let version = bundle.infoDictionary?["CFBundleShortVersionString"] as? String ?? "2.0.0-alpha.0" - let version = "2.0.0-rc.2" + let version = bundleForLock().infoDictionary?["CFBundleShortVersionString"] as? String ?? "2.0.0" authentication.using(inLibrary: name, version: version) webAuth.using(inLibrary: name, version: version) return (authentication, webAuth) diff --git a/README.md b/README.md index 4424bb5b9..5b23d8919 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ Lock makes it easy to integrate SSO in your app. You won't have to worry about: * Solving the home realm discovery challenge with enterprise users (i.e.: asking the enterprise user the email, and redirecting to the right enterprise identity provider). * Implementing a standard sign in protocol (OpenID Connect / OAuth2 Login) +Need help migrating from v1? Please check our [Migration Guide](MIGRATION.md) + ## Requirements - iOS 9 or later @@ -274,17 +276,19 @@ When signing up the default information requirements are the user's *email* and } ``` -*Note: You must specify the icon to use with your custom text field.* +*Note: You must specify the icon to use with your custom text field and store it in your App's bundle.* #### Enterprise * *enterpriseConnectionUsingActiveAuth*: By default Enterprise connections will use Web Authentication. However you can specify which connections will alternatively use credential authentication and prompt for a username and password. -* *activeDirectoryEmailAsUsername*: When in credential authentication mode, should the user require their email as an identifier. The default is `false`, use **Username**. +* *activeDirectoryEmailAsUsername*: When Lock request your enterprise credentials after performing Home Realm Discovery (HRD), e.g. for Active Directory, it will try to prefill the username for you. By default it will parse the email's local part and use that as the username, e.g. `john.doe@auth0.com` will be `john.doe`. If you don't want that you can turn on this flag and it will just use the email address. +```swift .withOptions { $0.activeDirectoryEmailAsUsername = true $0.enterpriseConnectionUsingActiveAuth = ["enterprisedomain.com"] } +``` ## What is Auth0?