Skip to content

Commit 81adbd3

Browse files
authored
Release 1.30.0 (#427)
1 parent c783ed6 commit 81adbd3

File tree

8 files changed

+51
-46
lines changed

8 files changed

+51
-46
lines changed

App/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.29.0</string>
18+
<string>1.30.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleURLTypes</key>

Auth0/Info-tvOS.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.29.0</string>
18+
<string>1.30.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Auth0/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.29.0</string>
18+
<string>1.30.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

Auth0Tests/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>BNDL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.29.0</string>
18+
<string>1.30.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change Log
22

3+
## [1.30.0](https://github.com/auth0/Auth0.swift/tree/1.30.0) (2020-10-23)
4+
[Full Changelog](https://github.com/auth0/Auth0.swift/compare/1.29.0...1.30.0)
5+
6+
**Added**
7+
- Added clearSession to the Objective-C WebAuth wrapper [\#426](https://github.com/auth0/Auth0.swift/pull/426) ([Widcket](https://github.com/Widcket))
8+
- Added Swift Package Manager support [SDK-2014] [\#425](https://github.com/auth0/Auth0.swift/pull/425) ([Widcket](https://github.com/Widcket))
9+
310
## [1.29.0](https://github.com/auth0/Auth0.swift/tree/1.29.0) (2020-10-08)
411
[Full Changelog](https://github.com/auth0/Auth0.swift/compare/1.28.0...1.29.0)
512

OAuth2Mac/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.29.0</string>
20+
<string>1.30.0</string>
2121
<key>CFBundleURLTypes</key>
2222
<array>
2323
<dict>

OAuth2TV/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.29.0</string>
18+
<string>1.30.0</string>
1919
<key>CFBundleVersion</key>
2020
<string>1</string>
2121
<key>LSRequiresIPhoneOS</key>

README.md

+38-40
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
[![License](https://img.shields.io/cocoapods/l/Auth0.svg?style=flat-square)](https://cocoadocs.org/docsets/Auth0)
77
[![Platform](https://img.shields.io/cocoapods/p/Auth0.svg?style=flat-square)](https://cocoadocs.org/docsets/Auth0)
88
![Swift 5.3](https://img.shields.io/badge/Swift-5.3-orange.svg?style=flat-square)
9-
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fauth0%2FAuth0.swift.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fauth0%2FAuth0.swift?ref=badge_shield)
109

1110
Swift toolkit that lets you communicate efficiently with many of the [Auth0 API](https://auth0.com/docs/api/info) functions and enables you to seamlessly integrate the Auth0 login.
1211

1312
## Important Notices
14-
- [Behaviour changes in iOS 13](https://github.com/auth0/Auth0.swift/pull/297) related to Web Authentication require that developers using Xcode 11 with this library **must** compile using Swift 5.x. This *should* be the default setting applied when updating, unless it has been manually set. However, we recommend checking that this value is set correctly.
13+
[Behaviour changes in iOS 13](https://github.com/auth0/Auth0.swift/pull/297) related to Web Authentication require that developers using Xcode 11 with this library **must** compile using Swift 5.x. This *should* be the default setting applied when updating, unless it has been manually set. However, we recommend checking that this value is set correctly.
1514

1615
## Table of Contents
1716

@@ -38,7 +37,7 @@ Swift toolkit that lets you communicate efficiently with many of the [Auth0 API]
3837
If you are using [Cocoapods](https://cocoapods.org), add this line to your `Podfile`:
3938

4039
```ruby
41-
pod 'Auth0', '~> 1.29'
40+
pod 'Auth0', '~> 1.30'
4241
```
4342

4443
Then run `pod install`.
@@ -50,7 +49,7 @@ Then run `pod install`.
5049
If you are using [Carthage](https://github.com/Carthage/Carthage), add the following line to your `Cartfile`:
5150

5251
```ruby
53-
github "auth0/Auth0.swift" ~> 1.29
52+
github "auth0/Auth0.swift" ~> 1.30
5453
```
5554

5655
Then run `carthage bootstrap`.
@@ -73,9 +72,6 @@ Then press **Next** and complete the remaining steps.
7372

7473
> For further reference on SPM, check [its official documentation](https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app).
7574
76-
> ### Upgrade Notes
77-
> If you are using the [clearSession](https://github.com/auth0/Auth0.swift/blob/master/Auth0/WebAuthenticatable.swift#L251) method in iOS 11+, you will need to ensure that the **Callback URL** has been added to the **Allowed Logout URLs** section of your application in the [Auth0 Dashboard](https://manage.auth0.com/#/applications/).
78-
7975
## Getting Started
8076

8177
### Authentication with Universal Login (iOS / macOS 10.15+)
@@ -100,7 +96,7 @@ Auth0
10096
}
10197
```
10298

103-
> This snippet sets the `audience` to ensure OIDC compliant responses, this can also be achieved by enabling the **OIDC Conformant** switch in your Auth0 dashboard under `Application / Settings / Advanced / OAuth`. For more information please check the [OIDC Conformant Authentication Adoption Guide](https://auth0.com/docs/api-auth/tutorials/adoption).
99+
> This snippet sets the `audience` to ensure OIDC compliant responses, this can also be achieved by enabling the **OIDC Conformant** switch in your Auth0 dashboard under `Application / Settings / Advanced / OAuth`.
104100
105101
3. Allow Auth0 to handle authentication callbacks. In your `AppDelegate.swift`, add the following:
106102

@@ -128,7 +124,7 @@ In order to use Auth0 you need to provide your Auth0 **ClientId** and **Domain**
128124
129125
#### Adding Auth0 Credentials
130126

131-
In your application bundle add a `plist` file named `Auth0.plist` with the following information.
127+
In your application bundle add a `plist` file named `Auth0.plist` with the following information:
132128

133129
```xml
134130
<?xml version="1.0" encoding="UTF-8"?>
@@ -143,11 +139,21 @@ In your application bundle add a `plist` file named `Auth0.plist` with the follo
143139
</plist>
144140
```
145141

142+
As an alternative, you can pass the ClientId & Domain programmatically.
143+
144+
```swift
145+
// When using Universal Login
146+
Auth0.webAuth(clientId: "{YOUR_AUTH0_CLIENT_ID}", domain: "{YOUR_AUTH0_DOMAIN}")
147+
148+
// When using the Authentication API
149+
Auth0.authentication(clientId: "{YOUR_AUTH0_CLIENT_ID}", domain: "{YOUR_AUTH0_DOMAIN}")
150+
```
151+
146152
#### Configure Callback URLs (iOS / macOS)
147153

148154
Callback URLs are the URLs that Auth0 invokes after the authentication process. Auth0 routes your application back to this URL and appends additional parameters to it, including a token. Since callback URLs can be manipulated, you will need to add your callback URL to the **Allowed Callback URLs** field in the [Auth0 Dashboard](https://manage.auth0.com/#/applications/). This will enable Auth0 to recognize these URLs as valid. If omitted, authentication will not be successful.
149155

150-
In your application's `Info.plist` file, register your iOS / macOS Bundle Identifer as a custom scheme:
156+
In your application's `Info.plist` file, register your iOS / macOS Bundle Identifer as a custom scheme.
151157

152158
```xml
153159
<!-- Info.plist -->
@@ -207,7 +213,7 @@ Auth0
207213

208214
#### Renew user credentials
209215

210-
Use a [Refresh Token](https://auth0.com/docs/tokens/concepts/refresh-tokens) to renew user credentials. It's recommended that you read and understand the refresh token process before implementing.
216+
Use a [Refresh Token](https://auth0.com/docs/tokens/refresh-tokens) to renew user credentials. It's recommended that you read and understand the refresh token process before implementing.
211217

212218
```swift
213219
Auth0
@@ -273,7 +279,7 @@ credentialsManager.credentials { error, credentials in
273279

274280
#### Clearing credentials and revoking refresh tokens
275281

276-
Credentials can be cleared by using the `clear` function, which clears credentials from the Keychain:
282+
Credentials can be cleared by using the `clear` function, which clears credentials from the Keychain.
277283

278284
```swift
279285
let didClear = credentialsManager.clear()
@@ -344,7 +350,7 @@ Find out more about [Setting up Facebook Login](https://auth0.com/docs/connectio
344350
### Authentication API (iOS / macOS / tvOS)
345351

346352
The Authentication API exposes AuthN/AuthZ functionality of Auth0, as well as the supported identity protocols like OpenID Connect, OAuth 2.0, and SAML.
347-
We recommend using [Universal Login](https://auth0.com/docs/universal-login) but if you wish to build your own UI, you can use our API endpoints to do so. However, some Auth flows (grant types) are disabled by default so you must enable them via your Auth0 Dashboard as explained in [Application Grant Types](https://auth0.com/docs/applications/concepts/application-grant-types#edit-available-grant_types).
353+
We recommend using [Universal Login](https://auth0.com/docs/universal-login) but if you wish to build your own UI, you can use our API endpoints to do so. However, some Auth flows (grant types) are disabled by default so you must enable them via your Auth0 Dashboard as explained in [Update Grant Types](https://auth0.com/docs/applications/update-grant-types).
348354

349355
These are the required Grant Types that needs to be enabled in your application:
350356

@@ -355,11 +361,10 @@ These are the required Grant Types that needs to be enabled in your application:
355361
```swift
356362
Auth0
357363
.authentication()
358-
.login(
359-
usernameOrEmail: "[email protected]",
360-
password: "secret-password",
361-
realm: "Username-Password-Authentication",
362-
scope: "openid profile")
364+
.login(usernameOrEmail: "[email protected]",
365+
password: "secret-password",
366+
realm: "Username-Password-Authentication",
367+
scope: "openid profile")
363368
.start { result in
364369
switch result {
365370
case .success(let credentials):
@@ -377,12 +382,10 @@ Auth0
377382
```swift
378383
Auth0
379384
.authentication()
380-
.createUser(
381-
382-
password: "secret-password",
383-
connection: "Username-Password-Authentication",
384-
userMetadata: ["first_name": "First",
385-
"last_name": "Last"])
385+
.createUser(email: "[email protected]",
386+
password: "secret-password",
387+
connection: "Username-Password-Authentication",
388+
userMetadata: ["first_name": "First", "last_name": "Last"])
386389
.start { result in
387390
switch result {
388391
case .success(let user):
@@ -422,13 +425,13 @@ such as `/userinfo`, please use the Auth0 domain specified for your Application
422425

423426
Example: `.audience("https://{YOUR_AUTH0_DOMAIN}/userinfo")`
424427

425-
Users of Auth0 Private Cloud with Custom Domains still on the [legacy behavior](https://auth0.com/docs/private-cloud/private-cloud-migrations/migrate-private-cloud-custom-domains#background) need to specify a custom issuer to match the Auth0 domain before starting the authentication. Otherwise, the ID Token validation will fail.
428+
Users of Auth0 Private Cloud with Custom Domains still on the [legacy behavior](https://auth0.com/docs/private-cloud/private-cloud-migrations/migrate-private-cloud-custom-domains) need to specify a custom issuer to match the Auth0 domain before starting the authentication. Otherwise, the ID Token validation will fail.
426429

427430
Example: `.issuer("https://{YOUR_AUTH0_DOMAIN}/")`
428431

429-
### Bot Protection
432+
### Bot Detection
430433

431-
If you are using the [Bot Protection](https://auth0.com/docs/anomaly-detection/bot-protection) feature and performing database login/signup via the Authentication API, you need to handle the `isVerificationRequired` error. It indicates that the request was flagged as suspicious and an additional verification step is necessary to log the user in. That verification step is web-based, so you need to use Universal Login to complete it.
434+
If you are using the [Bot Detection](https://auth0.com/docs/anomaly-detection/bot-detection) feature and performing database login/signup via the Authentication API, you need to handle the `isVerificationRequired` error. It indicates that the request was flagged as suspicious and an additional verification step is necessary to log the user in. That verification step is web-based, so you need to use Universal Login to complete it.
432435

433436
```swift
434437
let email = "[email protected]"
@@ -437,11 +440,10 @@ let scope = "openid profile"
437440

438441
Auth0
439442
.authentication()
440-
.login(
441-
usernameOrEmail: email,
442-
password: "secret-password",
443-
realm: realm,
444-
scope: scope)
443+
.login(usernameOrEmail: email,
444+
password: "secret-password",
445+
realm: realm,
446+
scope: scope)
445447
.start { result in
446448
switch result {
447449
case .success(let credentials):
@@ -464,11 +466,10 @@ Auth0
464466
}
465467
```
466468

467-
In the case of signup, you can add [an additional parameter](https://auth0.com/docs/universal-login/new-experience#signup) to make the user land directly on the signup page:
469+
In the case of signup, you can add [an additional parameter](https://auth0.com/docs/universal-login/new-experience#signup) to make the user land directly on the signup page.
468470

469471
```swift
470-
.parameters(["login_hint": email,
471-
"screen_hint": "signup"])
472+
.parameters(["login_hint": email, "screen_hint": "signup"])
472473
```
473474

474475
Check out how to set up Universal Login in the [Getting Started](#getting-started) section.
@@ -514,8 +515,8 @@ Auth0 helps you to:
514515

515516
* Add authentication with [multiple sources](https://auth0.com/docs/identityproviders), either social identity providers such as **Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce** (amongst others), or enterprise identity systems like **Windows Azure AD, Google Apps, Active Directory, ADFS, or any SAML Identity Provider**.
516517
* Add authentication through more traditional **[username/password databases](https://auth0.com/docs/connections/database/custom-db)**.
517-
* Add support for **[linking different user accounts](https://auth0.com/docs/link-accounts)** with the same user.
518-
* Support for generating signed [JSON Web Tokens](https://auth0.com/docs/tokens/concepts/jwts) to call your APIs and **flow the user identity** securely.
518+
* Add support for **[linking different user accounts](https://auth0.com/docs/users/user-account-linking)** with the same user.
519+
* Support for generating signed [JSON Web Tokens](https://auth0.com/docs/tokens/json-web-tokens) to call your APIs and **flow the user identity** securely.
519520
* Analytics of how, when, and where users are logging in.
520521
* Pull data from other sources and add it to the user profile through [JavaScript rules](https://auth0.com/docs/rules).
521522

@@ -535,6 +536,3 @@ If you have found a bug or to request a feature, please [raise an issue](https:/
535536
## License
536537

537538
This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.
538-
539-
540-
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fauth0%2FAuth0.swift.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fauth0%2FAuth0.swift?ref=badge_large)

0 commit comments

Comments
 (0)