Auth0.swift

Auth0 SDK for Apple platforms

MIT License

Stars
343
Committers
51

Bot releases are hidden (Show)

Auth0.swift - 1.0.0-rc.3

Published by hzalaz about 8 years ago

Full Changelog

Closed issues:

Changed:

  • Update for Swift 2.3 & Xcode 8 #46 (hzalaz)
Auth0.swift - 1.0.0-rc.2

Published by hzalaz about 8 years ago

Full Changelog

Changed:

Breaking changes:

The function enableLogging() was removed, so now to enable logging in the library you should enable it per-client instead of globally.

For Auth API

var auth = Auth0.authentication()
auth.logging(enabled: true)

For Users API

var users = Auth0.users(token: "token")
users.logging(enabled: true)

Also now you can provide a custom Logger to replace the default one (which just uses Swift print). It only needs to implement the protocol Logger

let logger = MyCustomLogger()
var auth = Auth0.authentication()
auth.usingLogger(logger)
Auth0.swift - 1.0.0-rc.1

Published by hzalaz about 8 years ago

Full Changelog

Added:

Auth0.swift - 1.0.0-beta.7

Published by hzalaz about 8 years ago

Full Changelog

Added:

Changed:

  • Improve error handling and Auth session management #39 (hzalaz)
  • Avoid using global telemetry. #38 (hzalaz)
Auth0.swift - 1.0.0-beta.6

Published by hzalaz about 8 years ago

Full Changelog

Added:

Auth0.swift - 1.0.0-beta.5

Published by hzalaz over 8 years ago

Full Changelog

Changed:

  • Renamed UserProfile to Profile #34 (hzalaz)

Breaking changes:

The UserProfile is not named Profile (in Objective C is A0Profile).

Auth0.swift - 1.0.0-beta.4

Published by hzalaz over 8 years ago

Full Changelog

Added:

  • Allow to override telemetry info #32 (hzalaz)

Fixed:

Auth0.swift - 1.0.0-beta.3

Published by hzalaz over 8 years ago

Full Changelog

Added:

  • Show better error when PKCE is not enabled in client #30 (hzalaz)
  • Auth0 telemetry information #29 (hzalaz)
  • Multifactor support for /oauth/ro #28 (hzalaz)

Changed:

  • Added parameter labels in Authentication API methods #27 (hzalaz)
  • Reworked Error handling #26 (hzalaz)

Breaking changes:

Most of the Authentication API methods first parameters labels are required so for example this call:

Auth0
    .login("[email protected]", password: "secret", connection: "connection")

now needs to have the usernameOrEmail parameter label

Auth0
    .login(usernameOrEmail: "[email protected]", password: "secret", connection: "connection")

Now all Result object return ErrorType instead of a specific error, this means that OS errors like no network, or connection could not be established are not wrapped in any Auth0 error anymore.

Also the error types that Auth0.swift API clients can return are no longer an enum but a simple object:

  • Authentication API: AuthenticationError
  • Management API: ManagementError

Each of them has it's own values according at what each api returns when the request fails. Now to handle Auth0.swift errors in your callback, you can do the following:

Auth0
    .login(usernameOrEmail: "[email protected]", password: "secret", connection: "connection")
    .start { result in
        switch result {
        case .Success(let credentials):
            print(credentials)
        case .Failure(let cause as AuthenticationError):
            print("Auth0 error was \(cause)")
        case .Failure(let cause):
            print("Unknown error: \(cause)")
        }
    }

Also, AuthenticationError has some helper methods to check for common failures:

Auth0
    .login(usernameOrEmail: "[email protected]", password: "secret", connection: "connection")
    .start { result in
        switch result {
        case .Success(let credentials):
            print(credentials)
        case .Failure(let cause as AuthenticationError) where cause.isMultifactorRequired:
            print("Need to ask the user for his mfa code!")
        case .Failure(let cause):
            print("Login failed with error: \(cause)")
        }
    }
Auth0.swift - 0.3.0

Published by hzalaz over 8 years ago

Full Changelog

Closed issues:

  • Alamofire dependency #5

Merged pull requests:

  • Update dependencies and fix compile issues #7 (hzalaz)
  • Load domain from Auth0.plist if not in main infoDictionary #4 (bradfol)
Auth0.swift - 1.0.0-beta.2

Published by hzalaz over 8 years ago

Full Changelog

Added:

  • Authenticate a user using web-based authentication with Auth0, e.g. social authentication. (iOS Only) #19,#20 & #24 (hzalaz)
  • Load Auth0 clientId & domain from a plist file #21 (hzalaz)
  • Request Logging support #23 (hzalaz)

Fixed:

  • Date parsing format in UserProfile #22 (srna)
Auth0.swift - 1.0.0-beta.1

Published by hzalaz over 8 years ago

Full Changelog

Added:

  • Auth0 Authentication API endpoints, now you can use Auth0.swift to write your own login box.

Changed:

  • Dropped support for iOS 8
  • Reworked Swift API and updated to Swift 2.2
  • Removed Alamofire as dependency, all networking is done with NSURLSession directly
  • Request callbacks, in Swift, have a single value of enum Result<Payload,ErrorType>
  • Improved code docs
Auth0.swift - 0.2.0

Published by hzalaz about 9 years ago

Full Changelog

Merged pull requests:

Auth0.swift - 0.1.2

Published by hzalaz over 9 years ago

Full Changelog

Merged pull requests:

  • Allow to call method users from Auth0 struct #1 (hzalaz)
Auth0.swift - 0.1.1

Published by hzalaz over 9 years ago

Auth0.swift - 0.1.0

Published by hzalaz over 9 years ago

* This Change Log was automatically generated by github_changelog_generator