Skip to content

Latest commit

 

History

History
236 lines (179 loc) · 12.1 KB

CHANGELOG.md

File metadata and controls

236 lines (179 loc) · 12.1 KB

Change Log

2.4.1 (2017-10-19)

Full Changelog

Changed

2.4.0 (2017-09-20)

Full Changelog

Changed

  • Disabled Code coverage Xcode 9 #467 (cocojoe)
  • Update Nimble lib and test code (Fixes tests in Xcode 9) #464 (cocojoe)

Fixed

2.3.1 (2017-07-11)

Full Changelog

Added

  • Added Error message on database user creation if user already exists #443 (f2m2rd)
  • Added allowShowPassword option, toggle password text visibility #442 (cocojoe)

Changed

  • Added Grant information for Passwordless docheaders #441 (cocojoe)

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)

Full Changelog

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)

Full Changelog

Added

  • Added Connection Scope support for OAuth2 connections #386 (cocojoe)
  • Native authentication handler support #377 (cocojoe)

Changed

  • Update evernote color to match branding #411 (hzalaz)

2.0.0 (2017-02-16)

Full Changelog

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)

Full Changelog

Added

Fixed

2.0.0-rc.1 (2016-12-16)

Full Changelog

Added

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

  • Fixed retain issues between presenter and views #355 (cocojoe)

2.0.0-beta.2 (2016-09-20)

Full Changelog

Added

2.0.0-beta.1 (2016-08-19)

Full Changelog

Lock for iOS rewritten in Swift

Usage

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)
}

Configuration

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

Auth0.plist file

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>

Classic

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)

Specify Connections

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)

Logging

In Lock.swift options you can turn on/off logging capabilities

Lock
    .classic()
    .options {
        $0.logLevel = .All
        $0.logHttpRequest = true
    }