Skip to content

Commit

Permalink
Formatting Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
cocojoe committed Sep 19, 2017
1 parent cc9007f commit 7c1e1f9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion App/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class ViewController: UIViewController {
var auth0 = Auth0.webAuth()
auth0
.logging(enabled: true)
.clearSession(federated: false) { print($0) }
.connection("google-oauth2")
.start(onAuth)
}

@IBAction func startTokenGoogleOAuth2(_ sender: Any) {
Expand Down
18 changes: 9 additions & 9 deletions Auth0/WebAuth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,17 @@ public protocol WebAuth: Trackable, Loggable {

```
Auth0
.webAuth(clientId: clientId, domain: "samples.auth0.com")
.start { result in
print(result)
}
.webAuth(clientId: clientId, domain: "samples.auth0.com")
.start { result in
print(result)
}
```

Then from `AppDelegate` we just need to resume the WebAuth Auth like this

```
func application(app: UIApplication, openURL url: NSURL, options: [String : Any]) -> Bool {
return Auth0.resumeAuth(url, options: options)
return Auth0.resumeAuth(url, options: options)
}
```

Expand All @@ -216,16 +216,16 @@ public protocol WebAuth: Trackable, Loggable {

```
Auth0
.webAuth()
.clearSession { print($0) }
.webAuth()
.clearSession { print($0) }
```

Remove Auth0 session and remove the IdP session.

```
Auth0
.webAuth()
.clearSession(federated: true) { print($0) }
.webAuth()
.clearSession(federated: true) { print($0) }
```

- parameter federated: Bool to remove the IdP session
Expand Down

0 comments on commit 7c1e1f9

Please sign in to comment.